1 #include "ace/Log_Msg.h"
3 #include "TimerDispatcher.h"
10 // Listing 1 code/ch20
11 int CB::handle_timeout (const ACE_Time_Value
&,
14 ACE_TRACE ("CB::handle_timeout");
16 const int *val
= static_cast<const int*> (arg
);
17 ACE_ASSERT ((*val
) == timerID_
);
24 ACE_TEXT ("Reseting interval for timer %d\n"),
27 // New interval is 10 ms.
28 ACE_Time_Value
interval (0L, 1000L);
29 int status
= Timer::instance ()->reset_interval
31 #if defined (ACE_NDEBUG)
32 ACE_UNUSED_ARG (status
);
34 ACE_ASSERT (status
!= -1);
40 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Canceling %d\n"),
42 ACE_ASSERT ((Timer::instance ()->cancel (this)) != 0);
50 CB::setID (long timerID
)
52 ACE_TRACE ("CB::setID");
59 ACE_TRACE ("CB::getID");
64 CB::handle_close (ACE_HANDLE
, ACE_Reactor_Mask
)
66 ACE_TRACE ("CB::handle_close");