std::chrono::steady_clockin libstdc++’s implementation of
std::condition_variable. I’m pleased to say that this problem will be solved when GCC 10 is released.
In the end, I managed to guide the “Invent a new pthreads function” solution through the Austin Group, although my proposed
pthread_cond_timedwaitonclockfunction became simply
pthread_cond_clockwaitand was joined by
sem_clockwaitalong the way. These new functions are available in glibc v2.30.
pthread_cond_clockwaitwas available in glibc, it was straightforward to fix libstdc++’s
std::condition_variableto use it.
Thanks to Adhemerval Zanella for reviewing the new glibc functions and Jonathan Wakely for reviewing the libstdc++ changes.