Javascript Library.
Commands 0 |
---|
Added in v 1.0.0
Run created timer once.
As in v 1.0.0 All examples bellow uses Timer object.
var timer = new _z.timer(function);
Please see: Timer object
_z.timer.once(status);
Returns: Object Timer object
_z.timer.once();
Returns: Boolean true OR false, true = this is Timer once.
// execute every 1 second
var timer1 = new _z.timer(()=>{ document.title = fns.time('s') + ":" + fns.time('m'); }, 1000);
timer1.once(); // false
timer1.once(true);
timer1.once(); // true
timer1.isRunning; // false
timer1.isReady(); // true
timer1.start();
timer1.isReady(); // false
timer1.isRunning; // false
timer1.stop();
timer1.isRunning; // false
timer1.isReady(); // false
timer1.once(); // true
timer1.execFunction(); // EXECUTE FUNCTION SUCCESS
timer1.once(false); // convert it to normal timer
timer1.isRunning; // false
timer1.isReady(); // true
timer1.start();
timer1.isReady(); // false
timer1.isRunning; // true