Class Util.Timer
Timer is a simplified timer object that makes it easier to handle timed tasks without
importing an Java classes directly. It offers simple ways to stop, start, and change
the function called when the timer is fired. The timer fires at the set interval.
Defined in: </ScriptBot/trunk/src/app/timer.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a default Timer object.
|
| Field Attributes | Field Name and Description |
|---|---|
|
The interval of the timer in seconds; the amount of time between each call to #onTimerFired.
|
|
|
The function called when the timer fires (the timer's interval is up).
|
|
true if the timer is currently active, false otherwise. |
Field Detail
{number}
interval
The interval of the timer in seconds; the amount of time between each call to #onTimerFired.
- Since:
- 2.0.1
- Default Value:
- 1
{Function}
onTimerFired
The function called when the timer fires (the timer's interval is up).
- Since:
- 2.0.1
- Default Value:
- undefined
{boolean}
ticking
true if the timer is currently active, false otherwise.
- Since:
- 2.0.1
- Default Value:
- false