Skip to main content

Module clock

Module clock 

Source
Expand description

Instance time: one monotonic clock per database instance (design 058 §3).

A Stamp is nanoseconds since the instance started (build()). Stamps are scoped to one instance lifetime: comparing stamps across a restart, or across two instances, is meaningless.

Structs§

Stamp
Nanoseconds since the instance started.

Traits§

InstanceClock
The instance’s clock, created once by build() through RuntimeOps::new_clock.

Functions§

stamp_from_duration
Converts an elapsed time to a stamp, saturating at u64::MAX.
stamp_from_millis_f64
Converts elapsed milliseconds as f64 (e.g. performance.now() differences) to a stamp, clamped to 0..=u64::MAX; NaN maps to zero.