2 #ifndef JAWS_TIMER_HELPERS_H
3 #define JAWS_TIMER_HELPERS_H
5 #include "ace/Singleton.h"
6 #include "ace/Event_Handler.h"
8 #include "jaws3/Timer.h"
9 #include "jaws3/Event_Completer.h"
10 #include "jaws3/Event_Result.h"
12 class JAWS_Timer_EH
: public ACE_Event_Handler
15 JAWS_Timer_EH ( JAWS_Event_Completer
*completer
19 : completer_ (completer
)
21 , interval_ (interval
)
26 int handle_timeout (const ACE_Time_Value
&tv
, const void *act
);
27 // Called when timer expires.
29 int handle_close (ACE_HANDLE h
, ACE_Reactor_Mask m
);
30 // Called directly when timer is canceled.
33 JAWS_Event_Completer
*completer_
;
39 #endif /* JAWS_TIMER_HELPERS_H */