Internal
A simple timer that stores only the latest measurement.
Readonly
true if timer has been started.
true
Gets the latest measurement. This function may return undefined if no measurement was done.
undefined
Samples the timer. Requires that the timer has started.
the current timer value; -1 if statistics are disabled.
-1
Resets the value to be able to start again.
Sets the measurement value for the amount of time that has elapsed from start() to stop(). Use this function to override the timer's duration.
The timer's duration.
Starts the timer. Returns the current time, based on Performance.now().
Performance.now()
Stops the timer. Requires that the timer has started.
Generated using TypeDoc
A simple timer that stores only the latest measurement.