summaryrefslogtreecommitdiff
path: root/java/JACE/tests/Reactor/TimerQueueTest.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-07-31 16:14:11 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-07-31 16:14:11 +0000
commit9c2ec3049a5634f1c916d792e81fc80edb669ea8 (patch)
tree0d634e179761581cadbffe852e7f9a9f049b5c6e /java/JACE/tests/Reactor/TimerQueueTest.java
parent6540653cf736840d5aad719c73a8e43a549080be (diff)
downloadATCD-9c2ec3049a5634f1c916d792e81fc80edb669ea8.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-1_4_2'.TAO-1_4_2
Diffstat (limited to 'java/JACE/tests/Reactor/TimerQueueTest.java')
-rw-r--r--java/JACE/tests/Reactor/TimerQueueTest.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/java/JACE/tests/Reactor/TimerQueueTest.java b/java/JACE/tests/Reactor/TimerQueueTest.java
deleted file mode 100644
index 93845ccb6ec..00000000000
--- a/java/JACE/tests/Reactor/TimerQueueTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// ============================================================================
-//
-// = PACKAGE
-// tests.Reactor
-//
-// = FILENAME
-// TimerQueueTest.java
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-package JACE.tests.Reactor;
-
-import JACE.OS.*;
-import JACE.ASX.*;
-import JACE.Reactor.*;
-
-public class TimerQueueTest implements EventHandler
-{
- public int handleTimeout (TimeValue tv, Object obj)
- {
- ACE.DEBUG ("handleTimeout: " + tv.toString () + " " + (String) obj);
- return 0;
- }
-
- public static void main (String args [])
- {
- ACE.enableDebugging ();
-
- TimerQueue tq = new TimerQueue (true);
- TimerQueueTest th1 = new TimerQueueTest ();
- int n = 5;
-
- ACE.enableDebugging ();
-
- try
- {
- if (args.length == 1)
- {
- n = Integer.parseInt (args[0]);
- }
- }
- catch (NumberFormatException e)
- {
- ACE.ERROR ("Illegal argument.");
- }
-
- // Set a periodic timer
- int id = tq.scheduleTimer (th1,
- "periodic",
- new TimeValue (2),
- new TimeValue (3));
-
- int i;
- // Set a bunch of single timers
- for (i=1; i <= n; i++)
- {
- tq.scheduleTimer (th1,
- "A-timer-" + new Integer (i),
- new TimeValue (i*2));
- }
-
- TimerQueueTest th2 = new TimerQueueTest ();
- for (i=1; i <= n; i++)
- {
- tq.scheduleTimer (th2,
- "B-timer-" + new Integer (i),
- new TimeValue (i*3));
- }
- // Cancel all timers associated with this handler
- tq.cancelTimer (th2);
-
- try
- {
- Thread.sleep (30000);
- }
- catch (InterruptedException e)
- {
- }
- tq.cancelTimer (id);
- System.exit (0);
- }
-}