| 1234567891011121314151617181920212223 |
- #include "dogcore.h"
- #include "dataprecess.h"
- DogCore::DogCore(QObject *parent) : QObject(parent)
- {
- hour = 0;
- timer = new QTimer(this);
- connect(timer,&QTimer::timeout,this,&DogCore::time_out);
- time_out();
- timer->start(10000);
- }
- void DogCore::time_out()
- {
- if((QDateTime::currentDateTime().toTime_t()-dataProcessShm->UpTime)>30){
- dataProcessShm->UpTime = QDateTime::currentDateTime().toTime_t();
- system("killall ytDashBoardCore");
- system("./ytDashBoardCore &");
- }
- }
|