We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f64d2a commit 91c0580Copy full SHA for 91c0580
system/lib/libc/musl/src/signal/setitimer.c
@@ -90,7 +90,11 @@ double _emscripten_next_timer()
90
next_timer = fmin(current_timeout_ms[which], next_timer);
91
}
92
93
- return next_timer - emscripten_get_now();
+ // Avoid calling emscripten_get_now() unless we need to here.
94
+ if (next_timer != INFINITY) {
95
+ next_timer -= emscripten_get_now();
96
+ }
97
+ return next_timer;
98
99
#endif
100
test/codesize/test_codesize_hello_dylink_all.json
@@ -1,7 +1,7 @@
1
{
2
"a.out.js": 244278,
3
- "a.out.nodebug.wasm": 577639,
4
- "total": 821917,
+ "a.out.nodebug.wasm": 577664,
+ "total": 821942,
5
"sent": [
6
"IMG_Init",
7
"IMG_Load",
0 commit comments