forked from dmzgroup/js
-
Notifications
You must be signed in to change notification settings - Fork 1
Timer
ben-sangster edited this page Apr 21, 2011
·
5 revisions
System timer. Can be used for repeating or non-repeating timers.
Found in "dmz/runtime/time".
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.