Class Timer
A Timer that, when running, repeatedly ticks at a specific interval.
Constructors
Name | Description |
this
(interval, autostart)
|
Instantiate a Timer that repeatedly ticks at every given interval.
|
Fields
Name | Type | Description |
onTick
|
Event!(teraflop.time.Timer) | Occurs when an interval amount of time has passed since the last tick event.
|
Properties
Name | Type | Description |
duration [get]
|
core.time.Duration | Duration that this timer has been running .
|
durationSeconds [get]
|
long | Duration that this timer has been running , in seconds.
|
justTicked [get]
|
bool | Whether this timer just ticked.
|
running [get]
|
bool | Whether or not this timer is ticking.
|
Methods
Name | Description |
start
()
|
Start this timer.
|
stop
()
|
Stop this timer.
|
update
()
|
Update this timer, resetting justTicked to false if neccesary since the last update.
|