Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 923 Bytes

wasi-default-clocks.wit.md

File metadata and controls

30 lines (26 loc) · 923 Bytes

WASI Default Clocks API

WASI Default Clocks provides value-exports of clock handles for monotonic and a wall-clock time, suitable for general-purpose application needs.

Imports

use { monotonic-clock, wall-clock } from wasi-clocks

default-monotonic-clock

/// Return a default monotonic clock, suitable for general-purpose application
/// needs.
///
/// This allocates a new handle, so applications with frequent need of a clock
/// handle should call this function once and reuse the handle instead of
/// calling this function each time.
default-monotonic-clock: monotonic-clock

default-wall-clock

/// Return a default wall clock, suitable for general-purpose application
/// needs.
///
/// This allocates a new handle, so applications with frequent need of a clock
/// handle should call this function once and reuse the handle instead of
default-wall-clock: wall-clock