Interface: Timer

Timer

Methods


cancelTick(handler)

An engine will call this function if it wants to prevent a scheduled function from being executed.

Parameters:
Name Type Description
handler Opaque

The handler returned by Timer#nextTick.

Source:

nextTick(fn)

An engine will call this function if it wants to schedule a function to be called at the next tick.

Parameters:
Name Type Description
fn function

The function that should be registered.

Source:
Returns:

handler

Type
Opaque

start(beginning, ending)

Start the timer.

Parameters:
Name Type Argument Description
beginning function <optional>

An optional function that will be called before each tick.

ending function <optional>

An optional function that will be caled after each tick.

Source:

stop()

Stop the timer.

Source: