-
Notifications
You must be signed in to change notification settings - Fork 1
.timer().execFunction()
hlaCk edited this page Jan 1, 2019
·
2 revisions
Added in v 1.0.0
Execute timer callback.
Please see: Timer object
As in v 1.0.0
All examples bellow uses Timer object.
all codes bellow after using this code:
var timer = new _z.timer(function);
timer.execFunction(force);
- timer method/action name.
- execFunction method/action name.
-
force (Argument) type Boolean, force execution even
_z.timer.hold = true;. ( Default: false )
Returns: callback (function) return
// execute every 1 second
var timer1 = new _z.timer(function() { return 123456; }, 1000);
timer1.isRunning; // false
timer1.isReady(); // true
timer1.execFunction(); // EXECUTE SUCCESS return: 123456
timer1.isReady(); // false
timer1.isRunning; // true
timer1.start();
timer1.isRunning; // true
timer1.isReady(); // false
timer1.execFunction(); // EXECUTE SUCCESS return: 123456
_z.timer.hold = true;
timer1.isRunning; // false
timer1.isReady(); // false
timer1.execFunction(); // EXECUTE FAILED return: Timer object
timer1.execFunction(true); // EXECUTE SUCCESS return: 123456