|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecterland.util.Timer
public class Timer
Timer class that calls your object at regular intervals
Constructor Summary | |
---|---|
Timer(long delay,
TimerListenerInterface listener)
Creates a new timer object which calls the specified listener at the specified interval |
Method Summary | |
---|---|
long |
getDelay()
Gets the current delay between timer tics |
boolean |
isRunning()
Checks if the timer is running |
void |
run()
Main loop |
void |
setDelay(long delay)
Sets the delay between timer ticks |
void |
start()
Starts the timer after it has been stopped |
void |
stop()
Stops the timer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timer(long delay, TimerListenerInterface listener)
delay
- Number of milliseconds between callslistener
- Listener object that should be calledMethod Detail |
---|
public boolean isRunning()
public void stop()
public void start()
public void setDelay(long delay)
delay
- Number of milliseconds between each timer tickpublic long getDelay()
public void run()
run
in interface Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |