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