// WASI Clocks. // // Some content here is derived from [CloudABI](https://github.com/NuxiNL/cloudabi). // // This is a `witx` file. See [here](https://github.com/WebAssembly/WASI/tree/master/docs/witx.md) // for an explanation of what that means. 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: function(id: clockid) -> expected // Return the time value of a clock. // Note: This is similar to `clock_gettime` in POSIX. time_get: function(id: clockid, precision: timestamp) -> expected