HP 3000 Manuals

clock [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

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



MPE/iX 5.0 Documentation