How i can calculate execution time in visual c++?

Hi

Dear all,

I want to calculate the execution time of a function and display. please guide me .

thanks in advance
Last edited on
1
2
3
4
5
6
7
8
9
10
11
#include <time.h>

// ...


double start = clock();

//some code ....

double end = clock();
double total = (end - start) / CLOCKS_PER_SEC;


Topic archived. No new replies allowed.