Files
cppcourse/397/SolutionEx11bug/Timer.h
T
2026-10-05 11:27:21 +02:00

28 lines
462 B
C++

// ======================================================
//
// 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