Reputation: 42924
To measure the execution time of some portion of C++ code on Windows, I tend to use the QueryPerformanceCounter()
high-resolution timer. An example of that can be found in this VCblog post on STL performance.
With the aim of writing cross platform C++ code, what functions/classes could I use for that same purpose?
Upvotes: 2
Views: 1641
Reputation: 247949
Assuming a modern compiler, you're probably looking for std::chrono::high_resolution_clock
Upvotes: 6