gamvas.timer

Functions to get information about timing.  Mostly for internal use.

Summary
gamvas.timerFunctions to get information about timing.
Functions
getSecondsGet the seconds since gamvas was started.
getMillisecondsGet the milliseconds since gamvas was started.
setGlobalTimeScaleScale the global time.
getGlobalTimeScaleReturns the global timescale

Functions

getSeconds

getSeconds: function()

Description

Get the seconds since gamvas was started.

getMilliseconds

getMilliseconds: function()

Description

Get the milliseconds since gamvas was started.

setGlobalTimeScale

setGlobalTimeScale: function(s)

Description

Scale the global time.  Use it to achieve slow motion or fast forward effects.  Time scale must be >= 0

Note

Does also ‘scale’ the frames per second value returned by gamvas.screen.getFPS.  So if you set a global time scale of 0.5, gamvas.screen.getFPS will return 120 when actually running on 60 fps

Parameters

stime scale factor (1 = normal, < 1 = slower, > 1 = faster)

getGlobalTimeScale

getGlobalTimeScale: function()

Description

Returns the global timescale

See

gamvas.timer.setGlobalTimeScale

getSeconds: function()
Get the seconds since gamvas was started.
getMilliseconds: function()
Get the milliseconds since gamvas was started.
setGlobalTimeScale: function(s)
Scale the global time.
getGlobalTimeScale: function()
Returns the global timescale
getFPS: function()
Returns the current frames per second.
Close