Skip to main content

Module venue_clock

Module venue_clock 

Source
Expand description

An estimate of a venue’s clock, read from the times the venue stamps on its events.

A venue’s timestamps and this host’s wall clock differ by an unknown amount that changes: the host clock can be skewed, drift, or step, as on an NTP step or a manual change. A span read from the venue by time, such as the fills missed while a stream was down, is a span on the venue’s clock, so a bound taken from the host’s wall clock can miss part of it.

VenueClock does not read the host’s wall clock. It keeps one time the venue stamped, paired with the moment the event arrived on tokio’s monotonic clock, and counts on from there on that clock, which a step of the wall clock does not move.

A read of a span the venue stamped, such as the fills missed while a stream was down, is placed with VenueClock::span_start and VenueClock::span_end, from the HostMoments that bound it on this host.

Structs§

HostMoment
A moment on this host: the time its wall clock read then, and the same moment on tokio’s monotonic clock.
VenueClock
The earliest a venue’s clock can read at a given moment, from the times it stamped on events this host received.