Skip to content
ben-sangster edited this page Oct 7, 2010 · 1 revision

Description

System timer. Can be used for repeating or non-repeating timers.

Functions

API

Found in "dmz/runtime/time".

API Functions

FunctionPtr setTimer (self, [int interval], Function fnc)

FunctionPtr setRepeatingTimer (self, [int interval], Function fnc)

  • Note: both of the above functions return the functions specified as their arguments, so that programmers may write functions direction into the call.

FunctionPtr cancelTimer (self, Function fnc)

  • Cancel the timer set by self with the function fnc. Return fnc.

Bool cancelAllTimers (self)

  • Cancel all timers set by self. Returns true if timers are deleted.

Number getFrameDelta ()

  • Return the delay between frames

Number getFrameTime ()

  • Returns the amount of time that has passed in this frame.

Number getSystemTime ()

  • Returns the number of seconds since the application started.
Clone this wiki locally