Skip to content
Juvix imports

module arch.node.engines.wall_clock_messages;

import prelude open;

Wall Clock Messages

These are the messages that the Wall Clock engine can receive/respond to.

Message Interface

Auxiliary Juvix code

syntax alias StorageKey := String;

syntax alias StorageValue := String;

syntax alias EpochTimestamp := Nat;

WallClockGetTime

A WallClockGetTime message tracks and manages time within the local computing environment. This message doesn't require any arguments.

WallClockGetTimeResult TimeResult

Response to a WallClockGetTime request.

type TimeResult : Type := mkTimeResult@{epochTime : EpochTimestamp};
Arguments
epochTime
The current time in epoch format (seconds/milliseconds since epoch)

WallClockMsg

type WallClockMsg :=
| WallClockGetTime
| WallClockGetTimeResult TimeResult;

Message Flow

Wall Clock Request & Response

sequenceDiagram
    participant WallClockClient
    participant WallClock

    WallClockClient ->> WallClock: WallClockGetTime
    WallClock ->> WallClockClient: WallClockGetTimeResult
Sequence Diagram: Wall Clock Time Request & Response