var d = new Date, i = setInterval(function () {console.log(new Date - d); d
= new Date;}, 1);

most likely gonna fire a sequence of

10
0
11
0
12
0
10
0
11
0
10
0

... not really reliable, even if delay is specified to 10 o 20, does not
look that consistent

with setTimeout, I have tried delay 3 and it's never less than 10 or 11,
but with delay 1 is almost always 0:
var d = new Date, delay = 3, i = setTimeout(function t() {console.log(new
Date - d); d = new Date; i = setTimeout(t, delay);}, delay);

br

On Mon, Jan 23, 2012 at 4:43 AM, Rick Waldron <waldron.r...@gmail.com>wrote:

> Node.js does *not* conform. Not at all. Not only it doesn't clamp to 4ms
>> (which happens to be a good thing, IMO), but its timers often fire out of
>> order !
>>
>
> Is there a reference or test case you can cite for this?  Thanks!
>
> Rick
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to