Files
simple-rust-tests/__wasm/wit-bindgen-sample/wit-bindgen/crates/parser/tests/ui/wasi-clock.wit

16 lines
601 B
Plaintext

// WASI Clocks.
//
// Some content here is derived from [CloudABI](https://github.com/NuxiNL/cloudabi).
use { clockid, timestamp, errno } from wasi
// Return the resolution of a clock.
// Implementations are required to provide a non-zero value for supported clocks. For unsupported clocks,
// return `errno::inval`.
// Note: This is similar to `clock-getres` in POSIX.
res-get: func(id: clockid) -> expected<timestamp, errno>
// Return the time value of a clock.
// Note: This is similar to `clock-gettime` in POSIX.
time-get: func(id: clockid, precision: timestamp) -> expected<timestamp, errno>