#ifndef SYNCTIMER_H
#define SYNCTIMER_H

#include <QThread>

class SyncTimer : public QThread {
    Q_OBJECT
public:
    int inter = 0;
    qint64 sleep = 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 // SYNCTIMER_H
