Expand description
Core time module — registers the sleep prelude function.
sleep(duration) spawns a tokio task that suspends for the given duration
and returns Value::Future immediately, so concurrent sleeps run in
parallel when driven by await. Uses tokio::time::sleep under the hood,
which is the asynchronous sleep primitive (does not block an OS thread).
Functions§
- register
- Register the
sleepglobal.