summaryrefslogtreecommitdiff
path: root/examples/Reactor/Misc/test_timer_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Reactor/Misc/test_timer_queue.cpp')
-rw-r--r--examples/Reactor/Misc/test_timer_queue.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/examples/Reactor/Misc/test_timer_queue.cpp b/examples/Reactor/Misc/test_timer_queue.cpp
deleted file mode 100644
index 641342b77cc..00000000000
--- a/examples/Reactor/Misc/test_timer_queue.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-
-// $Id$
-
-#include "ace/Timer_Queue.h"
-
-class Example_Handler : public ACE_Event_Handler
-{
-public:
- Example_Handler (void)
- : count_ (0)
- {}
-
- virtual int handle_timeout (const ACE_Time_Value &, const void *arg)
- {
- ACE_DEBUG ((LM_DEBUG,
- "yow, the time has come and gone %d times %d, Horatio!\n",
- this->count_++, int (arg)));
- return 0;
- }
-
-private:
- int count_;
-};
-
-int
-main (int argc, char *argv[])
-{
- ACE_Timer_Queue tq;
- Example_Handler eh;
-
- ACE_ASSERT (tq.is_empty ());
- ACE_ASSERT (ACE_Time_Value::zero == ACE_Time_Value (0));
- int timer_id;
-
- timer_id = tq.schedule (&eh, (const void *) 1, ACE_OS::gettimeofday ());
- tq.schedule (&eh, (const void *) 2, ACE_OS::gettimeofday ());
- tq.schedule (&eh, (const void *) 3, ACE_OS::gettimeofday ());
- tq.cancel (timer_id);
- ACE_ASSERT (!tq.is_empty ());
- tq.expire (ACE_OS::gettimeofday ());
- tq.schedule (&eh, (const void *) 4, ACE_OS::gettimeofday ());
- tq.schedule (&eh, (const void *) 5, ACE_OS::gettimeofday ());
- tq.cancel (&eh);
- ACE_ASSERT (tq.is_empty ());
- tq.expire (ACE_OS::gettimeofday ());
- return 0;
-}
-