Re: [Boost-bugs] [Boost C++ Libraries] #3504: deadline_timer (based on UTC time) is not suitable for communication timeouts

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3504: deadline_timer (based on UTC time) is not suitable for communication timeouts
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-01 12:15:35


#3504: deadline_timer (based on UTC time) is not suitable for communication
timeouts
--------------------------------------------+-------------------------------
  Reporter: Bjarne Laursen <bla@…> | Owner: chris_kohlhoff
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.41.0 | Component: asio
   Version: Boost 1.41.0 | Severity: Problem
Resolution: wontfix | Keywords:
--------------------------------------------+-------------------------------

Comment (by anonymous):

 Replying to [comment:10 kjohnson@…]:
> I may be wrong, but I think the attached file "monotone_timer.hpp-
 NO_MUTEX" suffers from really bad roll over issues. Multiplying a rolling
 monotonic timer by a constant (1000000000/frequency.QuadPart on line 80)
 doesn't produce a valid monotonic nanosecond count.
>
> I've attached the version I'm trying which keeps times and durations in
 terms of the performance counter
 (monotone_timer_better_rollover.cpp/.hpp).
>
> You use it as:
> TimerImpl m_Timer;
>
 m_Timer.expires_from_now(TimerTraits::milliseconds_to_duration(milliseconds_delay));

 Your attached code uses a header named CheckedInt64.h, could you add this
 as well please?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3504#comment:12>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC