5 #include "ace/Timer_Queue_T.h"
6 #include "ace/Timer_Heap_T.h"
11 // Listing 1 code/ch20
14 typedef ACE_Timer_Queue_T
<PCB
*, UpcallHandler
, ACE_Null_Mutex
>
17 // Create a special heap-based timer queue that allows you to
18 // control exactly how timer evetns are handled.
19 typedef ACE_Timer_Heap_T
<PCB
*, UpcallHandler
, ACE_Null_Mutex
>
26 // The signature of this method changed at ACE 5.4. The 'recurring_timer'
27 // parameter was added.
28 int timeout (PTimerQueue
&timer_queue
,
32 const ACE_Time_Value
&cur_time
);
35 // This method was removed at ACE 5.4. Replaced by cancel_type() and
37 // This method is called when the timer is canceled.
38 int cancellation (PTimerQueue
&timer_queue
,
42 // This method is called when the timer queue is destroyed and
43 // the timer is still contained in it.
44 int deletion (PTimerQueue
&timer_queue
,
48 // The following methods don't appear before ACE 5.4, so aren't
49 // referenced in APG (it's based on ACE 5.3).
51 // This method is called when a timer is registered.
52 int registration (PTimerQueue
&timer_queue
,
56 // This method is called before the timer expires.
57 int preinvoke (PTimerQueue
&timer_queue
,
61 const ACE_Time_Value
&cur_time
,
62 const void *&upcall_act
);
64 // This method is called after the timer expires.
65 int postinvoke (PTimerQueue
&timer_queue
,
69 const ACE_Time_Value
&cur_time
,
70 const void *upcall_act
);
72 // This method is called when a handler is cancelled
73 int cancel_type (PTimerQueue
&timer_queue
,
76 int &requires_reference_counting
);
78 // This method is called when a timer is cancelled
79 int cancel_timer (PTimerQueue
&timer_queue
,
82 int requires_reference_counting
);