From e63a37896804d4c483512f460931793a5188ee1c Mon Sep 17 00:00:00 2001 From: chatty Date: Mon, 13 Mar 1995 15:03:32 +0000 Subject: Added TimerSet::IsEmpty, and Timer::SetHandler --- utils/Timer.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/Timer.h b/utils/Timer.h index c0d8ffc..733a443 100644 --- a/utils/Timer.h +++ b/utils/Timer.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992-1993 + * Copyright 1992-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * timers @@ -21,6 +21,7 @@ #include "cplus_bugs.h" +#include "bool.h" #include "Time.h" class CcuSignalHandler; @@ -46,6 +47,7 @@ private: public: inline CcuTimerSet () : FirstTimer (0), OtherTimers () {} inline ~CcuTimerSet () {} +inline bool IsEmpty () const { return bool (FirstTimer == 0); } }; @@ -108,6 +110,8 @@ public: ~CcuBaseTimer (); }; +typedef void (*CcuTimerFun) (Millisecond); + class CcuTimer : public CcuBaseTimer { protected: void (*Handler) (Millisecond); @@ -116,7 +120,7 @@ protected: public: CcuTimer (Millisecond, void (*) (Millisecond), int = -1); ~CcuTimer (); +inline void SetHandler (void (*h) (Millisecond)) { Handler = h; } }; #endif /* Timer_H_ */ - -- cgit v1.1