OxL Reference

fn sleep

Suspends the current task (§17.4).

Example:

oxl✓ checked in CI
fn main() io, time {
  sleep(10ms)
  print("slept")
}
Output
slept
@intrinsic("sleep") pub(api) fn sleep(d: Duration) time

Since. 1.0.0-beta

Parameters

NameType
dDuration

Effects

time

Defined in: std/core/functions.oxl:86

See also