|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.adapters.Timer
This class provides synchronized access for a thread to a TimerEventQueue. It also provides for waiting until an event. NOTE: Calls to this object use delays, while the times in the TimerEventQueue are absolute!!!
Constructor Summary | |
Timer()
Constructs a Timer object which contains a TimerEventQueue. |
Method Summary | |
void |
clearTimer(java.lang.Object timeID)
Removes a TimerEvent from the TimerEventQueue. |
long |
getTimer(java.lang.Object timeID)
Return delay until a timer goes off. |
static void |
main(java.lang.String[] args)
|
void |
setTimer(java.lang.Object timeID,
long delay)
Adds a TimerEvent to the TimerEventQueue. |
java.lang.Object |
sleepUntilNextEvent()
Returns after a certain amount of time. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Timer()
Method Detail |
public void setTimer(java.lang.Object timeID, long delay)
timeID
- the id of a time eventdelay
- the time value in mspublic long getTimer(java.lang.Object timeID)
public void clearTimer(java.lang.Object timeID)
timeID
- the id of the time event to be removedpublic java.lang.Object sleepUntilNextEvent() throws java.lang.InterruptedException
java.lang.InterruptedException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |