|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectRDTTimer
TimerFactory.Timer
public class TimerFactory.Timer
A TimerFactory.Timer times tasks that need to be performed at a later time.
A TimerFactory.Timer has a task and a delay. The delay determines the interval of time between starting the timer and performing the task. A TimerFactory.Timer is is either an active state or a stopped state. When it is in an active state it has a scheduled time, which is the time when its task will be performed. When it is in a stopped state its task has no scheduled time.
| Constructor Summary | |
|---|---|
TimerFactory.Timer(long del,
TimingTask tsk)
new Timer(del, tsk) returns a new Timer that performs task tsk. |
|
| Method Summary | |
|---|---|
void |
start()
tmr.start() sets the scheduled time for tmr's task to the current time plus tmr's delay. |
void |
start(long del)
tmr.start(del) sets the scheduled time for tmr's task to the current time plus del. |
void |
stop()
tmr.stop() puts tmr in the stopped state. |
java.lang.String |
toString()
tmr.toString() returns a String of the form name"-Timer-"id where name is the name of the TimerFactory that created tmr and id is the identification number of tmr. |
| Methods inherited from class RDTTimer |
|---|
getPacket, setPacket |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimerFactory.Timer(long del,
TimingTask tsk)
| Method Detail |
|---|
public void start()
start in class RDTTimerpublic void start(long del)
start in class RDTTimerpublic void stop()
stop in class RDTTimerpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||