I need to calculate the execution time of a C++ program. I am currently using the c-style head, <time.h>
with the following code:
clock_t tStart = clock();
...
printf("Execution Time: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
Is there a c++ header I can use to calculate execution time? Please note this needs to be cross-platform compatible.