chore: Add course material
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// ======================================================
|
||||
//
|
||||
// A general-purpose countdown timer
|
||||
// To use this class, specialize it
|
||||
// and override tick()
|
||||
//
|
||||
// ======================================================
|
||||
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
|
||||
class Timer {
|
||||
public:
|
||||
Timer();
|
||||
|
||||
void timeoutRequest(int seconds);
|
||||
|
||||
virtual void tick() = 0;
|
||||
|
||||
protected:
|
||||
bool isExpired();
|
||||
|
||||
private:
|
||||
int timeToGo;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user