Constructor
new Timer(callback)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
callback |
The callback to be called when the timer expires. |
Methods
restart(delta)
- Source:
Set a new expiry time for the timer at the given number of milliseconds from now.
Parameters:
Name | Type | Description |
---|---|---|
delta |
Offset in milliseconds. |
start()
- Source:
Start the timer with a given offset. Same as restart().
stop()
- Source:
Stop the timer.