Sha256: 4c9f81b865e6599066dd437a24fd1e777d4eed4f3b37ab517b3fd7595cb76618

Contents?: true

Size: 1.27 KB

Versions: 25

Compression:

Stored size: 1.27 KB

Contents

;; 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 "typenames.witx")

(module $wasi_ephemeral_clock
  ;;; Linear memory to be accessed by WASI functions that need it.
  (import "memory" (memory))

  ;;; 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.
  (@interface func (export "res_get")
    ;;; The clock for which to return the resolution.
    (param $id $clockid)
    ;;; The resolution of the clock.
    (result $error (expected $timestamp (error $errno)))
  )

  ;;; Return the time value of a clock.
  ;;; Note: This is similar to `clock_gettime` in POSIX.
  (@interface func (export "time_get")
    ;;; The clock for which to return the time.
    (param $id $clockid)
    ;;; The maximum lag (exclusive) that the returned time value may have, compared to its actual value.
    (param $precision $timestamp)
    ;;; The time value of the clock.
    (result $error (expected $timestamp (error $errno)))
  )
)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
wasmtime-18.0.3 ./ext/cargo-vendor/wasi-common-18.0.3/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-17.0.1 ./ext/cargo-vendor/wasi-common-17.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-17.0.0 ./ext/cargo-vendor/wasi-common-17.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-16.0.0 ./ext/cargo-vendor/wasi-common-16.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-15.0.1 ./ext/cargo-vendor/wasi-common-15.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-15.0.0 ./ext/cargo-vendor/wasi-common-15.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-14.0.4 ./ext/cargo-vendor/wasi-common-14.0.4/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-14.0.3 ./ext/cargo-vendor/wasi-common-14.0.3/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-14.0.1 ./ext/cargo-vendor/wasi-common-14.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-14.0.0 ./ext/cargo-vendor/wasi-common-14.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-13.0.0 ./ext/cargo-vendor/wasi-common-13.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-12.0.1 ./ext/cargo-vendor/wasi-common-12.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-12.0.0 ./ext/cargo-vendor/wasi-common-12.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-11.0.0 ./ext/cargo-vendor/wasi-common-11.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-10.0.1 ./ext/cargo-vendor/wasi-common-10.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-10.0.0 ./ext/cargo-vendor/wasi-common-10.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-9.0.4 ./ext/cargo-vendor/wasi-common-9.0.4/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-9.0.1 ./ext/cargo-vendor/wasi-common-9.0.1/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-8.0.0 ./ext/cargo-vendor/wasi-common-8.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx
wasmtime-7.0.0 ./ext/cargo-vendor/wasi-common-7.0.0/WASI/phases/ephemeral/witx/wasi_ephemeral_clock.witx