std::clock()
measures the number of clock ticks within the duration of your program. In the following code, does it calculate the CPU time or wall clock time?
std::clock_t start; double duration;
start = std::clock();
/* Your algorithm here */
duration = ( std::clock() - start ) / (double) CLOCKS_PER_SEC;
In another scenario, with the following code:
std::clock_t start;
double time;
start = std::clock();
time = start / (double) CLOCKS_PER_SEC;
What will the value of time be?