[PATCH][BZ #12515] Improve precision of clock function

Paul Eggert eggert@cs.ucla.edu
Thu May 23 19:56:00 GMT 2013


On 05/23/13 12:20, Roland McGrath wrote:
> Why do you think this is desireable?  clock is an ancient interface and its
> callers expect the tick-granularity behavior it's always had.

My experience is the reverse: users of 'clock' are surprised
by how bad its granularity is, and wish that 'clock' would behave
as the patch proposes.  See, for example:

http://www.guyrutenberg.com/2007/09/10/resolution-problems-in-clock/

Admittedly 'clock' is an ancient and not-good interface, but
it's unlikely that the proposed patch would break existing
applications.  The most common use for 'clock' is for portability
to other operating systems, and portable applications typically
aren't assuming a particular granularity.



More information about the Libc-alpha mailing list