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