Skip to content

Commit ee0a3e6

Browse files
authored
Fix time scheduling of emscripten_set_timeout_loop(). (#12785)
1 parent fa5530d commit ee0a3e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library_html5.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2735,7 +2735,7 @@ var LibraryJSEvents = {
27352735
// Save a little bit of code space: modern browsers should treat
27362736
// negative setTimeout as timeout of 0
27372737
// (https://stackoverflow.com/questions/8430966/is-calling-settimeout-with-a-negative-delay-ok)
2738-
setTimeout(tick, t - performance.now());
2738+
setTimeout(tick, n - performance.now());
27392739
}
27402740
}
27412741
return setTimeout(tick, 0);

0 commit comments

Comments
 (0)