tinyvm.rcx
Class Timer
java.lang.Object
|
+--tinyvm.rcx.Timer
- public class Timer
- extends Object
Timer object, with some similar functionality to java.Swing.Timer.
- Author:
- Ryan VanderBijl
Method Summary |
int |
getDelay()
access how man milliseconds between timedOut() messages. |
void |
setDelay(int newDelay)
Change the delay between timedOut messages. |
void |
start()
Starts the timer, telling it to send timeOut() methods
to the TimerListener. |
void |
stop()
Stops the timer. |
Timer
public Timer(int theDelay,
TimerListener el)
- Create a Timer object. Every theDelay milliseconds
the el.timedOut() function is called. You may
change the delay with setDelay(int). You need
to call start() explicitly.
getDelay
public int getDelay()
- access how man milliseconds between timedOut() messages.
setDelay
public void setDelay(int newDelay)
- Change the delay between timedOut messages. Safe to call
while start()ed. Time in milli-seconds.
stop
public void stop()
- Stops the timer. timedOut() messages are not sent.
start
public void start()
- Starts the timer, telling it to send timeOut() methods
to the TimerListener.