12 lines
552 B
Rust
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;
|
|
}
|