quanta icon indicating copy to clipboard operation
quanta copied to clipboard

Unify global recent / global clock usage.

Open tobz opened this issue 3 years ago • 0 comments

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, while Clock::recent won't
  • Instant::recent is an acquire load, while Clock::recent is a relaxed load
  • quanta::set_recent and Clock::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.

tobz avatar Mar 09 '21 14:03 tobz