projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
222f85f
)
Fix bug in timers_uv timeout recomputation
author
Bert Belder
<bertbelder@gmail.com>
Mon, 4 Jul 2011 23:31:00 +0000
(
01:31
+0200)
committer
Bert Belder
<bertbelder@gmail.com>
Mon, 4 Jul 2011 23:31:23 +0000
(
01:31
+0200)
Closes #1209
lib/timers_uv.js
patch
|
blob
|
history
diff --git
a/lib/timers_uv.js
b/lib/timers_uv.js
index
2c37787
..
59b016e
100644
(file)
--- a/
lib/timers_uv.js
+++ b/
lib/timers_uv.js
@@
-67,8
+67,7
@@
function insert(item, msecs) {
list.ontimeout = function() {
debug('timeout callback ' + msecs);
- // TODO - don't stop and start the watcher all the time.
- // just set its repeat
+
var now = new Date();
debug('now: ' + now);
@@
-76,7
+75,7
@@
function insert(item, msecs) {
while (first = L.peek(list)) {
var diff = now - first._idleStart;
if (diff + 1 < msecs) {
- list.start(diff, 0);
+ list.start(
msecs -
diff, 0);
debug(msecs + ' list wait because diff is ' + diff);
return;
} else {