Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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,
}
MemberTypeDescription
unix-msu64
utc-offset-secondss32

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.