Table of Contents
Previous Section Next Section

clock

#include <time.h>clock_t clock(void);

The clock( ) function returns a value that approximates the amount of time the calling program has been running. To transform this value into seconds, divide it by CLOCKS_PER_SEC. A value of –1 is returned if the time is not available.

Related functions are time( ), asctime( ), and ctime( ).


Table of Contents
Previous Section Next Section