Home

Published

- 1 min read

run time in c

img of run time in c

The solution for this is noted below

run time in c

Solution

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

/* here, do your time-consuming job */

clock_t end = clock();
double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
printf("%f\n", time_spent);

Try other methods by searching on the site. That is if this doesn’t work