Subject: [Boost-bugs] [Boost C++ Libraries] #10069: Overflow in chrono clocks on 32bit
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-25 14:01:38
#10069: Overflow in chrono clocks on 32bit
--------------------------------------------------+---------------------
Reporter: Markus Friedrich <friedrich.at.gc@â¦> | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost Development Trunk | Severity: Problem
Keywords: |
--------------------------------------------------+---------------------
The chrono clocks process_real_cpu_clock, process_user_cpu_clock,
process_system_cpu_clock and process_cpu_clock may overflow on 32 bit
systems due to the multiplication of types clock_t (returned by
::times(...)) and long (returned by tick_factor()).
(The overflow occurs already at 2.14 seconds.)
Possible solution:
Change the return type of tick_factor() from long to nanoseconds::rep
(see attached patch)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10069> 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:16 UTC