https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87679
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-11-23 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- A faster clock can be considered to be constantly being adjusted slightly forwards, which means this wording from the standard applies: Recommended practice: Implementations should decrease the duration of the wait when the clock is adjusted forwards. I'm not really sure how to do that other than sleeping for smaller durations, so that we keep waking up to see if the time has been reached. That adds overhead due to the extra calls to the _Clock::now() function. We could do something like sleep for a maximum for N seconds when using a user-defined clock. For very small durations we wouldn't bother, and so there wouldn't be extra overhead. For longer durations, we'd periodically wake up and recheck the time.