Reports central processing unit (CPU) time used.
Standard C Library (libc.a)
clock_t clock (void);
The clock subroutine reports the amount of CPU time used. The reported time is the sum of the CPU time of the calling process and its terminated child processes for which it has executed wait, system, or pclose subroutines. To measure the amount of time used by a program, the clock subroutine should be called at the beginning of the program, and that return value should be subtracted from the return value of subsequent calls to the clock subroutine. To find the time in seconds, divide the value returned by the clock subroutine by the value of the macro CLOCKS_PER_SEC, which is defined in the time.h file.
The clock subroutine returns the amount of CPU time used.
This subroutine is part of Base Operating System (BOS) Runtime.
The getrusage, times (getrusage, getrusage64, times, or vtimes Subroutine) subroutine, pclose (pclose Subroutine) subroutine, system subroutine, vtimes (getrusage, getrusage64, times, or vtimes Subroutine) subroutine, wait, waitpid, wait3 subroutine.
Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.