Use steady_clock to implement condition_variable::wait_for
commitd2e378182a12d68fe5caeffae681252662a2fe7b
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 15:39:57 +0000 (1 15:39 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Aug 2018 15:39:57 +0000 (1 15:39 +0000)
tree823a9f37c46670bcc8fb5298f87b86f0029d25d0
parent79a8b4c1d70287ac0e668c4f2335d70d97c3002e
Use steady_clock to implement condition_variable::wait_for

The C++ standard says that std::condition_variable::wait_for should be
implemented to be equivalent to:

  return wait_until(lock, chrono::steady_clock::now() + rel_time);

But the existing implementation uses chrono::system_clock. Now that
wait_until has potentially-different behaviour for chrono::steady_clock,
let's at least try to wait using the correct clock.

2018-08-01  Mike Crowe  <mac@mcrowe.com>

* include/std/condition_variable (wait_for): Use steady_clock.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263225 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/condition_variable