This is the mail archive of the libc-alpha@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]

Re: [PATCH 12/12] Revise the documentation of ʽsimple calendar timeʼ.


On Tue, 20 Aug 2019, Paul Eggert wrote:

> Zack Weinberg wrote:
> > +@code{clock_t} is used to measure processor and CPU time.  Its values
> > +are counts of @dfn{clock ticks} since some arbitrary event.  The
> > +number of clock ticks per second is system-specific.
> 
> Also mention here that ISO C and POSIX both say that clock_t may be an an
> integer or a floating-point type.

I think the key fact about clock_t is that it (and so the functions using 
it) should be avoided because of limited range on many systems and 
getrusage should be used instead.  That's mentioned in the manual, but 
perhaps not given enough emphasis.

-- 
Joseph S. Myers
joseph@codesourcery.com


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