wasm-nats-producer-client/wit/deps/wasi-clocks-0.2.0/package.wit
2024-12-14 02:15:08 +01:00

30 lines
470 B
Plaintext

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;
}