C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
clock
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The clock function tells how much processor time has been used by
     the calling process. The time in seconds is approximated by
     dividing the clock return value by the value of the CLOCKS_PER_SEC
     constant.
 
     In other words, the clock function returns the number of processor
     timer ticks that have elapsed. A timer tick is approximately equal
     to 1/CLOCKS_PER_SEC seconds.
 
     In versions of Microsoft C prior to C 6.0, the CLOCKS_PER_SEC
     constant was called CLK_TCK.
 
     Return Value
 
     The clock function returns the product of the time in seconds and
     the value of the CLOCKS_PER_SEC constant. If the processor time is
     not available, the function returns the value -1, cast as clock_t.
 
     In DOS, clock returns the time elapsed since the process started.
     This may not be equal to the actual processor time used by the
     process.
                                    -♦-