Timer Class

Module: BinaryUtils

Time is user to call functions in loop at a defined rate.

Loop time can be changed dynamically, it is readjusted on the next timer call.

Item Index

Methods

Methods

start

()

Start timer, is the timer is already running dosen't do anything.

The callback is called right after starting the timer.

stop

()

Stop timer.

Attributes

callback

Function

Task of the timer, executed at the timer defined rate.

running

Boolean

Indicates if the timer is currently running, it is set to true on start and reset to false on stop.

running

Number

ID of the currently waiting timeout clock. Used to cancel the already request execution of the next clock tick.

time

Number

Period of the timer in milliseconds.