|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ponder2.Timer
public class Timer
Implements a multiple timer. Events may be fired off at regular intervals or
after a single interval.
Time can be given in milliseconds as a simple number or as hh:mm:ss. e.g.
0:22 would be 22 seconds.
If the event is declared with a count attribute then the attribute will be
set to the event number before each event is sent.
Nested Class Summary | |
---|---|
class |
Timer.Ticker
|
Method Summary | |
---|---|
protected void |
cancel()
stops and cancels all the timers. |
protected void |
cancel(int anIndex)
stops and cancels the timer at anIndex. |
protected int |
repeat(P2Object source,
java.lang.String time,
P2Object event)
sets up and starts a repetitive timer that send the event periodically. |
protected void |
start(int anIndex)
starts the timer at anIndex |
protected void |
stop(int anIndex)
stops the timer at anIndex |
protected int |
tick(P2Object source,
java.lang.String time,
P2Object event)
sets up and starts a one off timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected int tick(P2Object source, java.lang.String time, P2Object event) throws Ponder2ArgumentException
time
- the time before the event is sentevent
- the event to send
Ponder2ArgumentException
protected int repeat(P2Object source, java.lang.String time, P2Object event) throws Ponder2ArgumentException
time
- the time before the event is sentevent
- the event to send
Ponder2ArgumentException
protected void start(int anIndex)
anIndex
- the index of the timer to be startedprotected void stop(int anIndex)
anIndex
- the index of the timer to be stoppedprotected void cancel()
protected void cancel(int anIndex)
anIndex
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |