clock()

NAME

clock() - determine processor time used

SYNOPSIS

#include <time.h>

clock_t clock (void)

DESCRIPTION

The clock(3) function approximates the amount of processor time used since the invocation of the calling process, expressed as a clock_t.

To convert a clock_t value into seconds, divide by the macro CLOCKS_PER_SECOND.

RETURN VALUES

The clock(3) function returns the amount of time used; if an error occurs, the function returns -1.