feat(runtime): add host wall clock and administrative UTC timestamps
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user