Bug 428196
Summary: | CLOCKS_PER_SECOND clearly is not | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Scott Mcdermott <scott.m.mcdermott> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 8 | CC: | scott.m.mcdermott |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-01-09 21:55:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Description
Scott Mcdermott
2008-01-09 21:38:33 UTC
Created attachment 291206 [details]
program that uses CPU for a specified amount of time and prints tms_utimes divided by CLOCKS_PER_SECOND
You haven't bothered to read the man page, right? http://www.opengroup.org/onlinepubs/009695399/functions/times.html ... All times are measured in terms of the number of clock ticks used. ... Applications should use sysconf(_SC_CLK_TCK) to determine the number of clock ticks per second as it may vary from system to system. man 2 times and man 3p times contain similar wording. Created attachment 291219 [details]
add documentation to times() in glibc texinfo to use sysconf() to get the interval of units in struct tms, rather than the implied CLOCKS_PER_SECOND
You're right that I missed that, having looked only at the texinfo documentation. However, I was under the impression that the texinfo documentation was authoritative for glibc, and the information shown there is misleading, in my opinion, or at least inadequate. I attached a patch to the texinfo documentation that will bring it into consistency with the wording found in the referenced manual pages. If you like I can try to get it upstream instead of bothering fedora developers with having to put it in glibc-fedora.patch, but I do think it's important to include it. |