As this https://github.com/amethyst/amethyst/pull/2479 pull request puts into light, there are still issues with sleeping and spinning where we get the timings wrong. Along with this, we also receive issues from time to time about the cpu usage of the spin loop.
Currently, we are replicating the behavior of the https://crates.io/crates/spin_sleep.
Moving to it would allow us to work on other things than trying to get the sleeping and spinning behavior just right. However, spin_sleep doesn’t support wasm (I don’t think amethyst does either, to be honest.).
My suggestion would be that we add wasm compatibility in spin_sleep, integrate it in amethyst and remove our custom sleep/spin constructs.
Before this, I want to gather some opinions. Is there any reason we wouldn’t want to do this?