Timer(native)
Generates recurring events in an application.
Example
// Just one scheduled execution: var once = new Timer(100, false); // interval make no sense here once.start(500); // dealyed start one.onTick = function(sender) { } // each 500ms, repeats 3times only: var threeTimes = new Timer(500, 3);
Methods
-
dispose() : Timer
Stops and disposes timer object.
-
start([delay]) : Timer
Starts this timer.
-
stop() : Timer
Stops this timer. Stopped timer is still valid and can be used later. To destruct timer object you have to call dispose() method.
-
this(interval [, repeatOrTimes]) : Timer
Constructs timer object.