Clock
cinnabar:extension/clock@0.1.0
Local wall-clock time; requires the clock grant.
Grants: clock.
Types
local-time
Milliseconds since the Unix epoch and the local zone’s current offset from UTC.
record local-time {
unix-ms: u64,
utc-offset-seconds: s32,
}
| Member | Type | Description |
|---|---|---|
unix-ms | u64 | |
utc-offset-seconds | s32 |
Functions
read-local-time
read-local-time: func() -> result<local-time, string>;
Reads the local machine clock and its current UTC offset with clock authority.
Types: local-time.