Standard C does not provide standard tools for this. However, the clock() function returns time in CLOCK. there is CLOCKS_PER_SEC CLOCK per second. On my machine and implementation, CLOCKS_PER_SEC is defined as 1000. Both clock and CLOCKS_PER_SEC defined in <time.h> . Hope this helps
Armen Tsirunyan
source share