I\'m writing an application using C++ and OpenMP and I want to reliably (and correctly) measure time of execution of parts of it. I have reviewed a few options (Windows, TDM-GC
You didn't mention boost::chrono. Same as C++11 chrono
, but works with C++03 compiler.
Also, I cannot understand your hesitation about C++11. We are almost in 2015, and C++11 is not that new. It is even not the most recent standard. So, #include
is a way to go.
Note however, that chrono
is somewhat broken in Visual Studio 2013 Standard library implementation. I, personally, use std::chrono
everywhere and swap it to boost::chrono
via conditional defines
and typedef
s. Hope they'll fix it in Visual Studio Next.