Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (a - e) clock(3)
NAME
clock - Reports processor time used
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <time.h>
clock_t clock(void);
DESCRIPTION
The clock() function reports the amount of processor time used by the calling process.
To measure the time spent in a process, call clock() at the start of the process and subtract its
return value from the value returned by subsequent calls to clock().
RETURN VALUES
The clock() function returns the amount of processor time (in microseconds) used since the first
call to clock(). To determine the time in seconds, divide the value returned by clock() by the
value CLOCKS_PER_SEC.
RELATED INFORMATION
Functions: times(3), wait(2).
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. In the HP imple-
mentation, the era used by the clock() function is 00:00:00 UTC, 1 January 1970.
527192-007 Hewlett-Packard Company 1−39