diff options
| author | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-19 01:16:40 +0000 |
|---|---|---|
| committer | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-19 01:16:40 +0000 |
| commit | 810346d1068644561c0bfd0da3dd61f48a23b8a0 (patch) | |
| tree | 5b2ceb1a4a6f30a394548dafb9beca56dd065d16 /java/src/TimerQueue.java | |
| parent | ae01c7c3c9a8c5dfee220ec11a3c959c89787b75 (diff) | |
| download | ATCD-810346d1068644561c0bfd0da3dd61f48a23b8a0.tar.gz | |
Made some small changes so that there won't be warnings on NT when
java.lang is imported or stuff is imported from a package that it's
already a member of.
Diffstat (limited to 'java/src/TimerQueue.java')
| -rw-r--r-- | java/src/TimerQueue.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/src/TimerQueue.java b/java/src/TimerQueue.java index 74bac5ec398..e3aa30d9472 100644 --- a/java/src/TimerQueue.java +++ b/java/src/TimerQueue.java @@ -14,6 +14,8 @@ package JACE.Reactor; import java.util.*; import JACE.ASX.*; +import JACE.OS.*; + class TimerNode { public TimerNode (EventHandler handler, @@ -224,8 +226,13 @@ public class TimerQueue implements Runnable TimeValue timeout, TimeValue interval) { + // Increment the sequence number (it will wrap around). this.timerId_++; + + ACE.DEBUG("scheduleTimer (" + this.timerId_ + "): " + timeout + ", " + interval); + + TimeValue futureTime = TimeValue.plus (timeout, TimeValue.getTimeOfDay ()); TimerNode node = new TimerNode (handler, arg, @@ -360,6 +367,8 @@ public class TimerQueue implements Runnable this.reschedule (expired); } + ACE.DEBUG("handleTimeout " + expired.timerId_); + // Perform the callback. result = handler.handleTimeout (currentTime, arg); @@ -372,6 +381,9 @@ public class TimerQueue implements Runnable // position in the queue. private void reschedule (TimerNode expired) { + ACE.DEBUG("reschedule " + expired.timerId_ + " for " + expired.timerValue_); + // *** Shouldn't it use interval here? + if (this.isEmpty () || expired.timerValue_.lessThan (this.earliestTime ())) { |
