condition_variable workaround for wait_until with system time change
问题 I have a timer class which uses the std::condition_variable wait_until (I have also tried wait_for ). I am using the std::chrono::steady_clock time to wait until a specific time in the future. This is meant to be monotonic, but there has been a long standing issue with this where this actually uses the system clock and fails to work correctly when the system time is changed. It has been fixed in libc as suggested here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41861. the issue is that this