This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12515] clock() should provide better precision
- From: "stephane at magnenat dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 24 Feb 2011 13:34:09 +0000
- Subject: [Bug libc/12515] clock() should provide better precision
- Auto-submitted: auto-generated
- References: <bug-12515-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12515
StÃphane Magnenat <stephane at magnenat dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
Ever Confirmed|1 |0
--- Comment #5 from StÃphane Magnenat <stephane at magnenat dot net> 2011-02-24 13:34:04 UTC ---
Sorry, probably I missed something, but why couldn't one use the value returned
by clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ...) to implement clock()? One can
measure the time when the program starts, and then compute the difference to
implement a high-precision clock(). I do not know the details of the posix/C
specification, but I do not see any obstacle to improving the precision of
clock(), given that there already exist calls that provide this precision.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.