feat: add a histrical wit-bindgen

This commit is contained in:
2023-01-01 00:25:48 +08:00
parent 01e8f5a959
commit aa50d63aec
419 changed files with 45283 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
// 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>