Skip to main content

Module clock

Module clock 

Source
Expand description

The one time source this crate reads.

Core never calls the system clock. Every instant it stamps, and every comparison it makes against one — a bounded intervention’s expiry, the agent’s minimum interval — is read through a Clock, so that expiry is driven by time passing and by nothing else and a test drives it by advancing this one dependency alone.

A wait that is held only in memory — the detector’s resume grace — is timed on Clock::elapsed instead, which nothing steps: a host’s wall clock is moved by time synchronisation, and a wait measured across one such step is cut short or drawn out by the step.

Structs§

SystemClock
The system’s own clock, which is what a running supervisor is given.

Traits§

Clock
The instant core reads the current time from.

Functions§

plus_seconds
The instant seconds after instant.
seconds_between
How many whole seconds later is after earlier, saturating.
unix_seconds
One instant as whole seconds after the Unix epoch.