Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions wit-0.3.0-draft/monotonic-clock.wit
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ package wasi:[email protected];
/// successive reads of the clock will produce non-decreasing values.
@since(version = 0.3.0-rc-2025-08-15)
interface monotonic-clock {
use types.{duration};

/// An instant in time, in nanoseconds. An instant is relative to an
/// unspecified initial value, and can only be compared to instances from
/// the same monotonic-clock.
@since(version = 0.3.0-rc-2025-08-15)
type instant = u64;

/// A duration of time, in nanoseconds.
@since(version = 0.3.0-rc-2025-08-15)
type duration = u64;

/// Read the current value of the clock.
///
/// The clock is monotonic, therefore calling this function repeatedly will
Expand Down
8 changes: 8 additions & 0 deletions wit-0.3.0-draft/types.wit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package wasi:clocks@0.3.0-rc-2025-08-15;
/// This interface common types used throughout wasi:clocks.
@since(version = 0.3.0-rc-2025-08-15)
interface types {
/// A duration of time, in nanoseconds.
@since(version = 0.3.0-rc-2025-08-15)
type duration = u64;
}