Boost C++ Libraries: Ticket #12728: BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC incompatible with timed_wait https://svn.boost.org/trac10/ticket/12728 <p> If BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC is defined, timed_wait functions wait much longer than expected. </p> <p> To reproduce: </p> <pre class="wiki">#define BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC #include &lt;boost/date_time.hpp&gt; #include &lt;boost/thread.hpp&gt; int main(int argc, char** argv) { boost::condition_variable c; boost::mutex m; boost::unique_lock&lt;boost::mutex&gt; l(m); boost::system_time const timeout = boost::get_system_time() + boost::posix_time::milliseconds(500); c.timed_wait(l, timeout); // Waits for a long time c.timed_wait(l, boost::posix_time::milliseconds(500)); // Waits for an equally long time return 0; } </pre><p> These functions (along with other timed_ functions) are deprecated but are currently still allowed to be used in conjunction with BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12728 Trac 1.4.3 viboes Sun, 29 Jan 2017 16:21:31 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12728#comment:1 https://svn.boost.org/trac10/ticket/12728#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> The timed_wait interface is deprecated. Please, let me know if there are some issues with the chrono interface. </p> Ticket