pub fn sleep(dur: Duration)
Expand description

Universal version of std::thread::sleep.

Note that this doesn’t work properly in Safari: https://bugs.webkit.org/show_bug.cgi?id=234833 TODO(JP): If they don’t fix this, we should make our own version using Atomics.wait in JS instead.