Skip to content
ben-sangster edited this page Apr 21, 2011 · 5 revisions

Description

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

Functions

API

Found in "dmz/runtime/time".

API Functions

FunctionPtr setTimer (self, [Number interval], Function fnc (Number delta))

FunctionPtr setRepeatingTimer (self, [Number interval], Function fnc (Number delta))

  • Note: both of the above functions return the functions specified as their arguments.

  • Note: The interval is specified in seconds.

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