Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Task_Timer.h
blob547b47409157464a0b95d8effa00e65ac033f72c
1 /* -*- c++ -*- */
2 #ifndef JAWS_TASK_TIMER_H
3 #define JAWS_TASK_TIMER_H
5 #include "ace/Singleton.h"
6 #include "ace/Timer_Wheel.h"
7 #include "ace/Timer_Queue_Adapters.h"
9 #include "jaws3/Export.h"
10 #include "jaws3/Timer.h"
12 class JAWS_Task_Timer;
14 class JAWS_Export JAWS_Task_Timer : public JAWS_Timer_Impl
16 public:
17 JAWS_Task_Timer ();
19 static JAWS_Timer_Impl * instance ()
21 return ACE_Singleton<JAWS_Task_Timer, ACE_SYNCH_MUTEX>::instance ();
24 void schedule_timer ( long *timer_id
25 , const ACE_Time_Value &delta
26 , JAWS_Event_Completer *completer
27 , void *act = 0
30 void schedule_absolute_timer ( long *timer_id
31 , const ACE_Time_Value &tv
32 , JAWS_Event_Completer *completer
33 , void *act = 0
36 void schedule_interval_timer ( long *timer_id
37 , const ACE_Time_Value &interval
38 , JAWS_Event_Completer *completer
39 , void *act = 0
42 void cancel_timer (long timer_id);
43 // NOTE: Cancelling the timer causes handle_close to be called, but
44 // not handle_timeout (of couse, I mean in the ACE_Event_Handler that
45 // is being used as the timer helper).
47 private:
48 ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Wheel> timer_queue_;
51 #endif /* JAWS_TASK_TIMER_H */