clock.3 (582B)
1 .TH CLOCK 3 2 .SH NAME 3 clock - determine processor time 4 .SH SYNOPSIS 5 #include <time.h> 6 7 clock_t clock(void) 8 .SH DESCRIPTION 9 The 10 .BR clock () 11 function returns an approximation of processor time used by the program. 12 .SH RETURN VALUE 13 The value returned is the CPU time used so far as a clock_t. 14 In order to get the number of seconds used, divide by 15 .BR CLOCKS_PER_SEC . 16 If the processor time used is not available or its value cannot 17 be represented, the function returns the value (clock_t)-1. 18 .SH STANDARDS 19 ISO/IEC 9899:1999 Section 7.23.2.1 Paragraph 1,2,3 20 .SH SEE ALSO 21 .BR time.h (3)