Hey all,
Not sure if I am blatantly missing something, but I can not find any resource mentioning the current behaviour of setInterval/setTimeout methods in the Timers api for 0.4.x.
As per the current docs for 0.4.2, setTimeout and setInterval return a id, and can be cleared with clearInterval/clearTimeout.
http://nodejs.org/docs/v0.4.2/api/timers.html
But contrary to that, they apparently now return objects:
setTimeout (for 4000ms) returns:
{ _idleTimeout: 4000,
_onTimeout: [Function],
_idlePrev: { repeat: 4, _idleNext: [Circular], _idlePrev: [Circular], callback: [Function] },
_idleNext: { repeat: 4, _idleNext: [Circular], _idlePrev: [Circular], callback: [Function] },
_idleStart: Sun, 06 Mar 2011 00:55:16 GMT }
setInterval (every 4000ms) returns:
{ repeat: 4, callback: [Function] }
Is this expected or possibly new behaviour? I was able to clear the interval by deleting the callback property, but that I am not sure that is right... so, again, am I missing something?
For reference:
Using: v0.4.2
Platlform: Linux 2.6.35-27 (Ubuntu 10.10) x86_64
Cheers,