quanta
quanta copied to clipboard
Unify global recent / global clock usage.
During the work to expose more free functions on Instant
and add mock ability, we created a small rift between Clock
and Instant
.
Primarily, we have three issues:
-
Instant::recent
will fallback to the global clock, whileClock::recent
won't -
Instant::recent
is an acquire load, whileClock::recent
is a relaxed load -
quanta::set_recent
andClock::upkeep
aren't DRY (small problem, but still)
We should unify these codepaths so that we're limiting the chance for differences in behavior, as well as switching entirely to relaxed loads for "recent" time to ensure maximum performance.