http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58038
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Or we could just check unconditionally, which handles situations where the
clock is adjusted while sleeping:
/// sleep_until
template<typename _Clock, typename _Duration>
inline void
sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
{
auto __now = _Clock::now();
while (__now < __atime)
{
sleep_for(__atime - __now);
__now = _Clock::now();
}
}
I have another timing related bug to fix so will deal with this too.