clock(3) CLIX clock(3)
NAME
clock - Reports CPU time used
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
long clock(
void );
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 and its terminated child processes
for which it has executed wait(), pclose(), or system().
The resolution of the clock on Intergraph systems is 1/60 second.
EXAMPLES
To use the clock() function:
main()
{
.
.
.
printf("clock= %d microseconds\n",clock());
.
.
.
}
NOTES
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 will wrap around after accumulating only 2147
seconds of CPU time (about 36 minutes).
RELATED INFORMATION
Functions: times(2), wait(2), popen(3), system(3)
2/94 - Intergraph Corporation 1