Closed Elletra closed 6 years ago
Okay, good lord. This has been implemented with the uv.timer class. To use,
var a = new uv.timer();
a.start(500, 123, function(){print('test');}); //500 is the timeout, 123 is the repeat interval.
a.stop(); //To stop.
a.set_repeat(666); //This timer will now repeat every 666 ms..
setTimeout
returns an ID that can be passed intoclearTimeout
setInterval
returns an ID that can be passed intoclearInterval
Also, perhaps consider adding a
window
object?