qt/LedOK/ttimer.h

22 lines
406 B
C
Raw Normal View History

2022-01-20 10:08:17 +08:00
#ifndef TTIMER_H
#define TTIMER_H
#include <QThread>
class SyncTimer : public QThread {
Q_OBJECT
public:
int inter = 0;
explicit SyncTimer(int inter = 0);
inline int interval(){return inter;}
inline void setInterval(int inter){this->inter = inter;}
public slots:
inline void stop(){inter=0;}
signals:
void timeout();
protected:
void run() override;
};
#endif // TTIMER_H