Opened 9 years ago

Closed 9 years ago

#9337 closed Bugs (fixed)

chrono::process_cpu_clock time points wrong by factor 1000 on Linux

Reported by: Markus Friedrich <friedrich.at.gc@…> Owned by: viboes
Milestone: Boost 1.56.0 Component: chrono
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

The time point returned by boost::chrono::process_cpu_clock::now() is on Linux by a factor of 1000 to large. Measuring the duration between a sleep of e.g. 1 second returns

{1000000000000;0;0} nanoseconds

All other process clocks (process_real_cpu_clock, process_user_cpu_clock, process_system_cpu_clock) are fine!

Test program and patch attached.

Attachments (3)

test.cc (335 bytes ) - added by Markus Friedrich <friedrich.at.gc@…> 9 years ago.
test program
patchfile.patch (819 bytes ) - added by Markus Friedrich <friedrich.at.gc@…> 9 years ago.
patch
patchfile.2.patch (1.4 KB ) - added by Markus Friedrich <friedrich.at.gc@…> 9 years ago.
patch

Download all attachments as: .zip

Change History (8)

by Markus Friedrich <friedrich.at.gc@…>, 9 years ago

Attachment: test.cc added

test program

by Markus Friedrich <friedrich.at.gc@…>, 9 years ago

Attachment: patchfile.patch added

patch

by Markus Friedrich <friedrich.at.gc@…>, 9 years ago

Attachment: patchfile.2.patch added

patch

comment:1 by Markus Friedrich <friedrich.at.gc@…>, 9 years ago

Sorry, the first patch file is missing something. Please use patchfile.2.patch

comment:2 by viboes, 9 years ago

Status: newassigned

Thanks for catching this. The bug was introduced on [75920].

comment:3 by viboes, 9 years ago

Committed revision [86547].

comment:4 by viboes, 9 years ago

Milestone: To Be DeterminedBoost 1.56.0

comment:5 by viboes, 9 years ago

Resolution: fixed
Status: assignedclosed

Committed revision [86655].

Note: See TracTickets for help on using tickets.