chore: Add course material
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#ifndef TIMERSET_H
|
||||
#define TIMERSET_H
|
||||
|
||||
#include <ctime>
|
||||
|
||||
class Timer;
|
||||
|
||||
class TimerSet {
|
||||
public:
|
||||
void pollAllTimers();
|
||||
void addATimer(Timer *);
|
||||
|
||||
private:
|
||||
TimerSet();
|
||||
Timer *timers[40];
|
||||
int timersInUse;
|
||||
std::time_t previousTime;
|
||||
|
||||
// Meyer's singleton
|
||||
public:
|
||||
static TimerSet &Instance();
|
||||
|
||||
private:
|
||||
// prevent copying and assignment of the singleton
|
||||
TimerSet(const TimerSet &);
|
||||
TimerSet &operator=(const TimerSet &);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user