// 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>
