I'm working on comparing different sorting algorithms' efficiency and wondering, is there any way to check a running time of a specific block of code in C++ ?
What I normally get after the program executes is total time, including how long it took to print a bunch of output numbers. I'm trying to see how long just the processing part took, excluding all the couts, initializations, etc.
Ideally speaking, is it possible to have something like a stopwatch that I can start, pause and continue internally and then return the total time measured at the end?