0

I want to find running time of a program (not CPU time). I have written a c++ code as follows.

time_t start,end;
time (&start);
//code
time (&end);
double dif = difftime (end,start);
cout << dif ;

I got a output for particular instance as 2. what does this means? How can I get more accurate measure for elapse time (wall clock time)

Chamath Sajeewa
  • 300
  • 1
  • 14

0 Answers0