Commit d1129441 by Jonathan Wakely Committed by Jonathan Wakely

thread (this_thread::sleep_until): Move after sleep_for.

2011-05-27  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/thread (this_thread::sleep_until): Move after sleep_for.

From-SVN: r174365
parent 5aacb11e
2011-05-27 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/std/thread (this_thread::sleep_until): Move after sleep_for.
2011-05-27 Paolo Carlini <paolo.carlini@oracle.com> 2011-05-27 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/49187 PR libstdc++/49187
......
...@@ -260,12 +260,6 @@ _GLIBCXX_END_NAMESPACE_VERSION ...@@ -260,12 +260,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif #endif
#ifdef _GLIBCXX_USE_NANOSLEEP #ifdef _GLIBCXX_USE_NANOSLEEP
/// sleep_until
template<typename _Clock, typename _Duration>
inline void
sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
{ sleep_for(__atime - _Clock::now()); }
/// sleep_for /// sleep_for
template<typename _Rep, typename _Period> template<typename _Rep, typename _Period>
inline void inline void
...@@ -285,6 +279,12 @@ _GLIBCXX_END_NAMESPACE_VERSION ...@@ -285,6 +279,12 @@ _GLIBCXX_END_NAMESPACE_VERSION
::nanosleep(&__ts, 0); ::nanosleep(&__ts, 0);
} }
/// sleep_until
template<typename _Clock, typename _Duration>
inline void
sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
{ sleep_for(__atime - _Clock::now()); }
#endif #endif
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment