Skip to main content

Clock

Classes

Construct for keeping track of time

Functions

Clock

Construct for keeping track of time

Kind: global class

clock.elapsedTime : number

In seconds

Kind: instance property of Clock

clock.timeAtDelta : number

Timestamp when getDelta was last called In seconds

Kind: instance property of Clock

clock.speed : Stat

how fast clock ticks in relation to real time Allows us to slow down or speed up flow of time via modifiers, see Stat for details Default speed is x1, i.e. - unmodified

Kind: instance property of Clock
Read only: true

clock.multiplier

Kind: instance property of Clock

ParamType
vnumber

clock.multiplier ⇒ number

Kind: instance property of Clock

clock.getDelta() ⇒ number

Elapsed time since last getDelta call

Kind: instance method of Clock

clock.updateElapsedTime() ⇒ number

Kind: instance method of Clock

clock.getElapsedTime() ⇒ number

Time elapsed so far, since the clock was started Only counts time while running

Kind: instance method of Clock

updateElapsedTime(clock)

Kind: global function

ParamType
clockClock