Timer

The Timer class is used for calculating a time. The class method tick() is called in the main run loop.

new Timer()

Creates a Timer instance.

Members

static tick

Progresses the time of the timer.

Methods

getElapsed() → {Number}

Returns the elapsed time since the timer started.

Returns:
Number The elapsed time

reset()

Resets the timer.

start()

Starts the timer.

stop()

Stops the timer.