UnderZ

Javascript Library.

Added in v 1.0.0

Run timer once.

Run created timer once.


As in v 1.0.0 All examples bellow uses Timer object.

Create new timer object:

var timer = new _z.timer(function);

Please see: Timer object


Set timer is once timer

_z.timer.once(status);

Returns: Object Timer object


Check timer if its once timer

_z.timer.once();

Returns: Boolean true OR false, true = this is Timer once.


Examples

// 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