Files
prometeu-runtime/crates/console/prometeu-hal/src/wall_clock.rs
T
bquarkz 23dc6fc66d
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
feat(runtime): add host wall clock and administrative UTC timestamps
2026-10-13 09:16:15 +01:00

12 lines
552 B
Rust

/// Host civil time for administrative timestamps, independent of gameplay and deadlines.
///
/// Reads must be local and bounded, without waiting for IO or clock synchronization.
/// The host always supplies a value, even when its civil clock is incorrect.
pub trait WallClock {
/// Whole UTC seconds since the Unix epoch, with fractions discarded.
///
/// Values outside the unsigned range saturate to zero or `u64::MAX`.
/// Successive reads may go backwards when the host adjusts its clock.
fn utc_unix_seconds(&self) -> u64;
}