pub trait Clock {
// Required methods
fn now(&self) -> Timestamp;
fn boot_now(&self) -> Timestamp;
fn sleep(&self, d: Millis);
}Required Methods§
Sourcefn now(&self) -> Timestamp
fn now(&self) -> Timestamp
Wall-clock time: for what people see and records compared across boots.
Sourcefn boot_now(&self) -> Timestamp
fn boot_now(&self) -> Timestamp
Milliseconds on CLOCK_BOOTTIME: for everything that does not survive
a reboot (approval tokens, leases, cooldowns, windows; §12h). Moving
the wall clock never moves it.