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-14 01:36:43
#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 kjohnson@â¦):
It is just a class that performs 64-bit arithmetic with overflow checking.
This is internal code that I would require permission to release -
honestly I can't be bothered doing this. You can just replace it with
normal 64-bit arithmetic if you want.
e.g.
boost::posix_time::time_duration TimerTraits::to_posix_duration(
const TimerTraits::duration_type& d)
{
return boost::posix_time::milliseconds(d.ticks_ * 1000 /
performance_freq_);
}
Replying to [comment:12 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:14> 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:07 UTC