Closed
Description
Heya, e4df140 uses wasm_timer::Delay
in src/utils.rs
for WASM target's Timer
implementation. When running a countdown async task in a loop with a 50 ms delay, it pauses for 4 seconds every 19 iterations (observed in both Chrome and Firefox):
Switching it to futures_timer::Delay
allows it to loop smoothly:
#776 has the change, though futures-timer
depends on async-std
in [dev-dependencies]
, so not sure if you'd like the somewhat cyclic reference.
futures-timer
backs onto gloo_timers
, which calls the browser's setTimeout
API. I couldn't figure out how wasm-timer
does it.
Metadata
Metadata
Assignees
Labels
No labels