summaryrefslogtreecommitdiff
path: root/examples/Reactor/Misc/test_timer_queue.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-30 06:50:29 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-30 06:50:29 +0000
commita4a7690c336d4c8a16b3041c86d501ba38226e96 (patch)
tree9e9f93a98edd2591453f092d178ad29a1c5fb519 /examples/Reactor/Misc/test_timer_queue.cpp
parenta5c4d8047ab58df5c45092e18ae503ad40518f0e (diff)
downloadATCD-unlabeled-4.1.2.tar.gz
This commit was manufactured by cvs2svn to create branchunlabeled-4.1.2
'unlabeled-4.1.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;
-}
-