Newer
Older
ZXSSCJ / CounterRealTime / common / utils / TimerCounterUtil.h
#ifndef TIMERCOUNTERUTIL_H
#define TIMERCOUNTERUTIL_H

#include <QObject>
#include <QTimer>

class TimerCounterUtil : public QObject
{
public:

    ~TimerCounterUtil() {}
    TimerCounterUtil(const TimerCounterUtil&)=delete;
    TimerCounterUtil& operator=(const TimerCounterUtil&)=delete;

    static TimerCounterUtil& getInstance() {
        static TimerCounterUtil instance;
        return instance;
    }

    QTimer * clockCounter; // 界面刷新时间定时器
    // QTimer * alamrCounter; // 请求报警定时器
    QTimer * heartCounter; // 心跳定时器

private:
    TimerCounterUtil()
    {
        clockCounter = new QTimer();
        heartCounter = new QTimer();
    }

};

#endif // TIMERCOUNTERUTIL_H