Function mz_adapter::coord::timeline::monotonic_now
source · pub fn monotonic_now(now: NowFn, previous_now: Timestamp) -> Timestamp
Expand description
Returns the current system time while protecting against backwards time jumps.
The caller is responsible for providing the previously recorded system time
via the previous_now
parameter.
If previous_now
is more than TIMESTAMP_INTERVAL_UPPER_BOUND * TIMESTAMP_PERSIST_INTERVAL
milliseconds ahead of the current system time
(i.e., due to a backwards time jump), this function will block until the
system time advances.
The returned time is guaranteed to be greater than or equal to
previous_now
.