Repository navigation
setTimeout bug. There is example #8354
Copy link
Copy link
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
Description
Activity
In chrome 52.0.2743.116, the result is right.
- addedtimersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
on Aug 31, 2016 i review timers.js@v4.5.0 code, found the following code can be cause this problem.
if (diff < msecs) { list.start(msecs - diff, 0); debug('%d list wait because diff is %d', msecs, diff); return; }
change to
if (diff < msecs) { if (diff >= 0) { list.start(msecs - diff, 0); debug('%d list wait because diff is %d', msecs, diff); } else { list.start(msecs, 0); } return; }
can alleviate this issue
but in master version change the timeRemaining calc solve this issue
seems v6.5.0 solved this issue, should I close this?
@alsotang can you please test on latest 5.x?
This was fixed by 5aac4c4 which landed in v6.x here: 49a6ea1
The v5.x branch is now end-of-life and will not receive it.
As noted in #3063 (comment), this fix is not on v4.x at the current time, but should probably land at some point.
- addedduplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.
on Aug 31, 2016 ok, I start use v6.5.0 right now.
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.timersIssues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().Issues and PRs related to timers, setImmediate(), setInterval(), and setTimeout().
timediff should be 20+ms, but it would equal to the while block time.