Re: [PATCH 12/12] Revise the documentation of ‘simple calendar time’.
Joseph Myers
joseph@codesourcery.com
Tue Aug 20 19:38:00 GMT 2019
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
More information about the Libc-alpha
mailing list