I would like to print time of function
I'm working with
volatile clock_t clock_start=0;
volatile clock_t clock_stop=0;
volatile clock_t clock_diff;
double tics = 0;
clock_start = clock();
function (); // some
clock_stop = clock();
clock_diff = ( (clock_stop - clock_start)) ;
tics= ((double) clock_diff/CLOCKS_PER_SEC);
printf("Time taken is %g seconds\n",(tics));
for short time it is working
but NOT if it takes more seconds.
Can you help me?