std::clock()measures the number of measures over the duration of your program. Does the following code calculate the processor time or the wall clock?
std :: clock_t start; double duration;
start = std::clock();
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 be the meaning of time?
source
share