Boost C++ Libraries: Ticket #2447: get_due_time returns incorrect due_time if boost::date_time resolution is nanoseconds https://svn.boost.org/trac10/ticket/2447 <p> There is a bug in the calculation of due_time (line 343 in thread.cpp) where the calculation to add the fractional seconds will always add 0 if the boost::date_time library has been configured to use nanosecond resolution. </p> <p> The integer division of hundred_nanoseconds_in_one_second/target_time.abs_time.time_of_day().ticks_per_second() will be 0 when date_time uses nanosecond resolution since the denominator will be 10<strong>9 and always greater than the numerator which is 10</strong>7. At the default date_time resolution of 10<strong>6 this works fine. </strong></p> <p> Facilities like boost::condition::timed_wait which rely on this function will not block for the desired amount of time if the wait time is &lt; 1 sec. </p> <p> This issue has been present since 1.35.0. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2447 Trac 1.4.3 martin@… Thu, 10 Sep 2009 19:41:17 GMT version, milestone changed https://svn.boost.org/trac10/ticket/2447#comment:1 https://svn.boost.org/trac10/ticket/2447#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.36.0</span> → <span class="trac-field-new">Boost 1.40.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost 1.41.0</span> </li> </ul> <p> I've encountered this issue in the latest 1.40 release as well. Are there any plans to fix it for 1.41? </p> Ticket viboes Fri, 20 Nov 2009 12:19:32 GMT <link>https://svn.boost.org/trac10/ticket/2447#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2447#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2447#comment:1" title="Comment 1">martin@…</a>: </p> <blockquote class="citation"> <p> I've encountered this issue in the latest 1.40 release as well. Are there any plans to fix it for 1.41? </p> </blockquote> <p> Hi, </p> <p> I was wondering if you have a patch to solve this issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 30 Mar 2010 22:39:03 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/2447#comment:3 https://svn.boost.org/trac10/ticket/2447#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">chris_kohlhoff</span> </li> </ul> Ticket chris_kohlhoff Fri, 02 Apr 2010 02:20:49 GMT owner changed https://svn.boost.org/trac10/ticket/2447#comment:4 https://svn.boost.org/trac10/ticket/2447#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">chris_kohlhoff</span> to <span class="trac-author">Anthony Williams</span> </li> </ul> <p> I think this was reassigned to me by mistake. </p> Ticket anonymous Tue, 08 Jun 2010 08:40:48 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2447#comment:5 https://svn.boost.org/trac10/ticket/2447#comment:5 <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">fixed</span> </li> </ul> <p> Fixed on trunk </p> Ticket