Permalink
Browse files

Allow one extra ms in timer diff

Fixes sporadic test-next-tick-ordering.js failures
  • Loading branch information...
1 parent 7c0f453 commit 82e9da9fb7fb79bf730d7c1b01cb4a46ed3d5994 @ry ry committed Jan 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/timers.js
View
@@ -85,7 +85,7 @@ function insert(item, msecs) {
var first;
while (first = peek(list)) {
var diff = now - first._idleStart;
- if (diff < msecs) {
+ if (diff + 1 < msecs) {
list.again(msecs - diff);
debug(msecs + ' list wait because diff is ' + diff);
return;

0 comments on commit 82e9da9

Please sign in to comment.