- Source:
Members
member
period :bigint
- The period of the timer in nanoseconds.
Type:
- bigint
- Source:
member
timerPeriod
Get the timer period.
- Source:
Methods
function
callTimerWithInfo() → {object}
Call a timer and starts counting again, retrieves actual and expected call time.
- Source:
Returns:
- The timer information.
Type
object
function
cancel() → {undefined}
Cancel the timer.
- Source:
Returns:
Type
undefined
function
changeTimerPeriod(period) → {undefined}
Change the timer period.
Parameters:
| Name | Type | Description |
|---|---|---|
period |
bigint | The new period in nanoseconds. |
- Source:
Returns:
Type
undefined
function
isCanceled() → {boolean}
Check if the timer is canceled.
- Source:
Returns:
Return true if timer is canceled, otherwise return false.
Type
boolean
function
isReady() → {boolean}
Check if the timer is ready.
- Source:
Returns:
Return true if timer is ready, otherwise return false.
Type
boolean
function
reset() → {undefined}
Reset the timer.
- Source:
Returns:
Type
undefined
function
timeSinceLastCall() → {bigint}
Get the interval since the last call of this timer.
- Source:
Returns:
- the interval value in nanoseconds.
Type
bigint
function
timeUntilNextCall() → {bigint}
Get the interval until the next call will happen.
- Source:
Returns:
- the interval value in nanoseconds.
Type
bigint