clock [C++ Reference]
Keywords: c,date,clock
Date: 2008-10-14T15:42:00-0700

[[clock]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## clock

Syntax:

        #include <ctime>
        clock_t clock( void );

The clock() function returns the processor time since the program started, or - 1 if that information is unavailable. To convert the return value to seconds, divide it by CLOCKS_PER_SEC. (Note: if your compiler is POSIX compliant, then CLOCKS_PER_SEC is always defined as 1000000.)

Related Topics: asctime, ctime, time

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •