Module spin_sdk.wit.imports.wasi_clocks_monotonic_clock_0_2_6
WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
It is intended to be portable at least between Unix-family platforms and Windows.
A monotonic clock is a clock which has an unspecified initial value, and successive reads of the clock will produce non-decreasing values.
Functions
def now() ‑> int-
Expand source code
def now() -> int: """ Read the current value of the clock. The clock is monotonic, therefore calling this function repeatedly will produce a sequence of non-decreasing values. """ raise NotImplementedErrorRead the current value of the clock.
The clock is monotonic, therefore calling this function repeatedly will produce a sequence of non-decreasing values.
def resolution() ‑> int-
Expand source code
def resolution() -> int: """ Query the resolution of the clock. Returns the duration of time corresponding to a clock tick. """ raise NotImplementedErrorQuery the resolution of the clock. Returns the duration of time corresponding to a clock tick.
def subscribe_duration(when: int) ‑> Pollable-
Expand source code
def subscribe_duration(when: int) -> wasi_io_poll_0_2_6.Pollable: """ Create a `pollable` that will resolve after the specified duration has elapsed from the time this function is invoked. """ raise NotImplementedErrorCreate a
pollablethat will resolve after the specified duration has elapsed from the time this function is invoked. def subscribe_instant(when: int) ‑> Pollable-
Expand source code
def subscribe_instant(when: int) -> wasi_io_poll_0_2_6.Pollable: """ Create a `pollable` which will resolve once the specified instant has occurred. """ raise NotImplementedErrorCreate a
pollablewhich will resolve once the specified instant has occurred.