This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12515] clock() should provide better precision


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]