clock
Purpose
Reports CPU time used.
Library
Standard C Library (libc.a)
Syntax
long clock ( )
Description
The clock subroutine 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 a wait system call or a system
subroutine. The nominal resolution of the clock is
16.667 milliseconds if the process is being profiled;
otherwise, it is 100 milliseconds. See "monitor" and
"profil" for information about profiling a process.
Note: The value returned by the clock subroutine 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 approximately 2147 seconds of CPU time
(about 36 minutes).
Related Information
In this book: "system," "times," and "wait."