Answers for "how to calculate the execution time of a program in c"

7

run time in c

#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);
Posted by: Guest on June-21-2020
0

execution time of c program

clock_t begin = clock();

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

clock_t end = clock();
double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
Posted by: Guest on May-20-2021
-2

how to calculate the execution time of a program in c

clock
Posted by: Guest on May-30-2021

Code answers related to "how to calculate the execution time of a program in c"

Browse Popular Code Answers by Language