#ifndef TIMERSET_H #define TIMERSET_H #include #include #include class Timer; class TimerSet { public: void pollAllTimers(); void addATimer(Timer *); private: TimerSet(); std::vector timers; std::time_t previousTime; std::thread pollingThread; // Meyer's singleton public: static TimerSet &Instance(); private: // prevent copying and assignment of the singleton TimerSet(const TimerSet &); TimerSet &operator=(const TimerSet &); void poll10Hz(); }; #endif