Timer
class haxe.TimerAvailable in flash8, flash, neko, js, php, cpp, cs, javaExecutes a function repeatedly, waiting a set amount of time between calls. To use a timer, create it and set the
This is only supported on platforms that provide a native event loop. function new( time_ms : Int ) : VoidAvailable in flash8, flash, js, cs, javaCreate a new timer that calls
run method.This is only supported on platforms that provide a native event loop. function new( time_ms : Int ) : VoidAvailable in flash8, flash, js, cs, javaCreate a new timer that calls
run every time_ms milliseconds.
dynamic function run() : VoidAvailable in flash8, flash, js, cs, javaThis is the [run()] method that is called when the Timer executes. It can be either overridden in subclasses or directly rebinded with another function-value.
function stop() : VoidAvailable in flash8, flash, js, cs, javaStops the timer.
static function delay( f : Void -> Void, time_ms : Int ) : TimerAvailable in flash8, flash, js, cs, javaThis will delay the call to [f] for the given time. [f] will only be called once.
static function measure<T>( f : Void -> T, ?pos : PosInfos ) : TMeasure the time it takes to execute the function [f] and trace it. Returns the value returned by [f].
static function stamp() : FloatReturns the most precise timestamp, in seconds. The value itself might differ depending on platforms, only differences between two values make sense.
version #19362, modified 2013-05-19 16:16:17 by vegetablesalad
1 comment
-
valtsMay 19, 2013 at 15:24