|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.robokind.api.common.utils.TimerLoop
public abstract class TimerLoop
Abstract class for performing an action at regular intervals.
| Constructor Summary | |
|---|---|
TimerLoop(long interval)
Creates a new TimerLoop with the given interval in milliseconds. |
|
| Method Summary | |
|---|---|
long |
getIntervalLength()
Returns the interval length. |
void |
setIntervalLength(long interval)
Sets the interval length. |
void |
start()
Start performing the action at intervals. |
void |
stop()
Stop the timer. |
protected abstract void |
timerTick(long time,
long interval)
Action to perform at regular intervals. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimerLoop(long interval)
interval - number of milliseconds between performing the action| Method Detail |
|---|
public void setIntervalLength(long interval)
interval - number of milliseconds between performing the actionpublic long getIntervalLength()
protected abstract void timerTick(long time,
long interval)
time - current timeinterval - length of the timer intervalpublic void start()
public void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||