-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setTimeout bug. There is example #8354
Comments
In chrome 52.0.2743.116, the result is right. |
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. |
ok, I start use v6.5.0 right now. |
timediff should be 20+ms, but it would equal to the while block time.
The text was updated successfully, but these errors were encountered: