dogcore.cpp 521 B

1234567891011121314151617181920212223
  1. #include "dogcore.h"
  2. #include "dataprecess.h"
  3. DogCore::DogCore(QObject *parent) : QObject(parent)
  4. {
  5. hour = 0;
  6. timer = new QTimer(this);
  7. connect(timer,&QTimer::timeout,this,&DogCore::time_out);
  8. time_out();
  9. timer->start(10000);
  10. }
  11. void DogCore::time_out()
  12. {
  13. if((QDateTime::currentDateTime().toTime_t()-dataProcessShm->UpTime)>30){
  14. dataProcessShm->UpTime = QDateTime::currentDateTime().toTime_t();
  15. system("killall ytDashBoardCore");
  16. system("./ytDashBoardCore &");
  17. }
  18. }