pub const Duration = struct pub fn sleep(duration: Clock.Duration, io: Io) Cancelable!voidWaits until a specified amount of time has passed on clock.
See also:
Io.sleepClock.Timestamp.waitTimeout.sleep999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012 pub const Duration = struct {
raw: Io.Duration,
clock: Clock,
/// Waits until a specified amount of time has passed on `clock`.
///
/// See also:
/// * `Io.sleep`
/// * `Clock.Timestamp.wait`
/// * `Timeout.sleep`
pub fn sleep(duration: Clock.Duration, io: Io) Cancelable!void {
return io.vtable.sleep(io.userdata, .{ .duration = duration });
}
}