ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

wasi:clock_res_get

T1 wasm syscall syscall
WASI Preview 1 Syscall: clock_res_get
SourceWASI Snapshot Preview 1 System Call Interface (WebAssembly/WASI) (wasi_syscalls)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeWASI Preview 1 (wasip1)
WebAssembly WASI Preview 1 (Wasmtime, WasmEdge, Wasmer, WAMR, Node.js)
License & VersionW3C Community CLA
wasi_snapshot_preview1
Upstreamhttps://github.com/WebAssembly/WASI/blob/wasi-0.1/preview1/witx/wasi_snapshot_preview1.witx
Privilegeguest->host
ExtensionsWASI, wasip1, wasi_snapshot_preview1

Summary

WASI wasi_snapshot_preview1 host syscall clock_res_get. 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.

Syntax / Encoding

wasi_snapshot_preview1::clock_res_get(id: $clockid) -> (expected $timestamp (error $errno))

Operands

NameDescription
idThe clock for which to return the resolution.
errorThe resolution of the clock, or an error if one happened.