Reports central processing unit (CPU) time used.
#include <time.h>
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 subroutine, pclose subroutine, system subroutine, vtimes subroutine, wait, waitpid, wait3 subroutine.
Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.