Skip to main content

Module time

Module time 

Source
Expand description

Clock and entropy seam for library code.

In normal builds Instant is std::time::Instant and entropy reads the wall clock, so behaviour is identical to calling them directly. Under --cfg spawned_sim both come from the running simulation: Instant reads virtual time and entropy is a stream derived from the simulation seed, so restart windows, shutdown deadlines, backoff jitter and metrics timings are deterministic per seed and advance in virtual time.

Structs§

Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

Functions§

entropy
Seed material for jitter and similar randomization: wall-clock nanoseconds mixed with a process-wide counter (distinct per call), or, under simulation, the next value of the simulation’s entropy stream.