Allow one extra ms in timer diff

Fixes sporadic test-next-tick-ordering.js failures
This commit is contained in:
Ryan Dahl 2011-01-11 16:51:07 -08:00
parent 7c0f453b7c
commit 82e9da9fb7

View File

@ -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;