Static methods
Constructor
Variables
started:Bool
Whether the timer is currently scheduled.
Setting this to true starts the timer, and setting it to false stops it.
Methods
loop(lock:Bool = true):Bool
Starts the timer as an infinite loop.
This is a convenience alias for repeat(0, lock).
Parameters:
lock | Whether to skip starting when the timer is already running. |
|---|
Returns:
true if looping was started.
repeat(count:Int = 1, lock:Bool = true):Bool
Starts the timer repeatedly.
Repetitions are driven by scaled time, just like start.
Parameters:
count | Number of repetitions. Use |
|---|---|
lock | Whether to skip starting when the timer is already running. |
Returns:
true if repeating was started.
start(lock:Bool = true):Bool
Starts the timer.
Starting resets the active callback chain back to the original one-shot callback.
Parameters:
lock | Whether to skip starting when the timer is already running. |
|---|
Returns:
true if the timer was started.