Module sys/timer

sys/timer

Async timer operations.

Provides high-level async timer functions:

  • sleep(ms) — async sleep for the given number of milliseconds

Returns an IOFuture that resolves to a positive value on success or a negative errno. Use with await in async contexts.

Functions

sleep function
fn(milliseconds : u64) -> IOFuture

Parameters

NameTypeNotes
millisecondsu64

Returns: IOFuture