summaryrefslogtreecommitdiff
path: root/examples/Reactor/Misc/test_timer_queue.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-01 08:00:34 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-01-01 08:00:34 +0000
commit437eea6fa08e931864f89be91d14a816f69075c7 (patch)
treeb8c1fd723fdcd61c3855d3a3a21a9cd45a268219 /examples/Reactor/Misc/test_timer_queue.cpp
parentea0d28240863caf437a18071bfd03e7b146c5ade (diff)
downloadATCD-unlabeled-4.2.2.tar.gz
This commit was manufactured by cvs2svn to create branchunlabeled-4.2.2
'unlabeled-4.2.2'.
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;
-}
-