Timer
class haxe.TimerAvailable in flash, flash9, neko, js, php, cppExecutes a function repeatedly, waiting a set amount of time between calls. To use a timer, create it and set the
Note (from Nicolas' statement): Since Neko is not event-based, there is no other way than using threads for timer. Timer might create a lot of bugs/crashes. The class is left unimplemented in neko for this reason. function new( time_ms : Int ) : VoidAvailable in flash, flash9, js, cppCreate a new timer that calls
run method.Note (from Nicolas' statement): Since Neko is not event-based, there is no other way than using threads for timer. Timer might create a lot of bugs/crashes. The class is left unimplemented in neko for this reason. function new( time_ms : Int ) : VoidAvailable in flash, flash9, js, cppCreate a new timer that calls
run every time_ms milliseconds.
dynamic function run() : VoidAvailable in flash, flash9, js, cppThe function that the timer calls. The timer starts when run is set.
function stop() : VoidAvailable in flash, flash9, js, cppStops the timer.
static function delay( f : Void -> Void, time_ms : Int ) : TimerAvailable in flash, flash9, js, cppCalls a function once after the specified delay.
static function measure<T>( f : Void -> T, ?pos : PosInfos ) : T
static function stamp() : FloatReturns a timestamp, in seconds
version #10393, modified 2011-04-03 12:08:33 by bubblebenj