wasm-nats-stream-client/wit/deps/wasi-clocks-0.2.0/package.wit

30 lines
470 B
Plaintext
Raw Permalink Normal View History

2024-12-05 23:30:02 +00:00
package wasi:clocks@0.2.0;
interface monotonic-clock {
use wasi:io/poll@0.2.0.{pollable};
type instant = u64;
type duration = u64;
now: func() -> instant;
resolution: func() -> duration;
subscribe-instant: func(when: instant) -> pollable;
subscribe-duration: func(when: duration) -> pollable;
}
interface wall-clock {
record datetime {
seconds: u64,
nanoseconds: u32,
}
now: func() -> datetime;
resolution: func() -> datetime;
}