HP C/iX Library Reference Manual (30026-90004)
Chapter 5 123
HP C/iX Library Function Descriptions
clock
clock
Reports CPU time used.
Syntax
#include <time.h>
clock_t clock (void)
Parameters
None.
Return Values
x The number of clock ticks consumed by the program.
Description
The clock function returns the amount of CPU time, in microseconds, used since the first
call to clock(). The time reported is the sum of the user and system times of the calling
process.
The resolution of the clock varies, depending on the hardware and on the software
configuration. On MPE/iX, the clock resolution is 10 milliseconds.
The value returned by clock() is defined in microseconds for compatibility with systems
that have CPU clocks with much higher resolution. Because of this, the value returned
wraps around after accumulating only 2147 seconds of CPU time (about 36 minutes).
See Also
ANSI C 4.12.2.1