Skip to main content

vihaco_stdlib/clock/
mod.rs

1// SPDX-FileCopyrightText: 2026 The vihaco Authors
2// SPDX-License-Identifier: MIT
3
4//! Reusable global-clock and timing vocabulary for vihaco runtimes.
5//!
6//! [`GlobalClock`] is an ordered event queue. It owns modeled timeline state,
7//! but does not execute instructions, dispatch events, or know about the
8//! machine that owns it. A runtime can use the types in this module to build
9//! its own scheduling policy and root event loop.
10
11mod error;
12mod queue;
13mod traits;
14mod types;
15
16#[cfg(test)]
17mod types_tests;
18
19pub use error::ClockFault;
20pub use queue::GlobalClock;
21pub use traits::{ClockedComponent, TimedInstruction};
22pub use types::{GlobalDuration, GlobalTick, GlobalTicksPerLocalCycle, LocalCycles, Schedule};