timed is the time service daemon for EriX.
Find a file
Erik Inkinen f0781d911c
All checks were successful
CI / test (push) Successful in 5s
CI / security (push) Successful in 1m26s
CI / minimal-versions (push) Successful in 11s
timed: drop unstable rustfmt options for stable toolchains
2026-03-23 10:19:57 +02:00
.github Refactor architecture and implement timed service daemon 2026-03-05 12:50:21 +02:00
src runtime-mode: migrate feature gates and document mode model 2026-03-11 08:04:59 +02:00
.editorconfig Initial commit 2026-03-05 10:48:19 +01:00
.gitignore Initial commit 2026-03-05 10:48:19 +01:00
ARCHITECTURE.md Refactor architecture and implement timed service daemon 2026-03-05 12:50:21 +02:00
Cargo.toml runtime-mode: migrate feature gates and document mode model 2026-03-11 08:04:59 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-05 10:48:19 +01:00
CONTRIBUTING.md Initial commit 2026-03-05 10:48:19 +01:00
LICENSE Initial commit 2026-03-05 10:48:19 +01:00
linker.ld Refactor architecture and implement timed service daemon 2026-03-05 12:50:21 +02:00
README.md Refactor architecture and implement timed service daemon 2026-03-05 12:50:21 +02:00
ROADMAP.md Refactor architecture and implement timed service daemon 2026-03-05 12:50:21 +02:00
rustfmt.toml timed: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:57 +02:00
SECURITY.md docs: align security policy phase numbering 2026-03-11 05:28:15 +02:00

timed

timed is the time service daemon for EriX.

It provides deterministic time primitives to userspace over IPC and integrates with service discovery and system daemons.

Provided IPC operations

  • IPC_PHASE1_TIMED_OP_NOW_MONOTONIC (0x530)
  • IPC_PHASE1_TIMED_OP_NOW_WALL (0x531)
  • IPC_PHASE1_TIMED_OP_WAIT_UNTIL (0x532)

Time model

  • Monotonic source: kernel control op READ_MONOTONIC_CLOCK (op_id=13)
  • v1 frequency: ticks_per_second = 1000
  • Wall source: synthetic wall clock (epoch_seconds = 0) derived from monotonic ticks
  • Wait model: one-shot blocking wait until deadline (WAIT_FLAG_BLOCK)

Startup and discovery

  • Validates standard root service startup envelope (SERVICE_ROLE_TIMED)
  • Registers itself with named in discovery-enabled runtime modes
  • Uses deterministic startup failure on envelope or capability contract mismatch

Determinism and failure policy

  • Invalid inputs return deterministic IPC result codes (INVALID_ARGUMENT, INTERNAL, etc.)
  • No panic-path behavior for malformed runtime requests
  • Single-threaded service loop with bounded static buffers

Build and test

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features

Dependencies

  • lib-bootstrap
  • lib-capabi
  • lib-ipc
  • lib-service
  • ipc-syscall-x86_64

No external crates are used.