Correct way of portably timing code using C++11
问题 I'm in the midst of writing some timing code for a part of a program that has a low latency requirement. Looking at whats available in the std::chrono library, I'm finding it a bit difficult to write timing code that is portable. std::chrono::high_resolution_clock std::chrono::steady_clock std::chrono::system_clock The system_clock is useless as it's not steady, the remaining two clocks are problematic. The high_resolution_clock isn't necessarily stable on all platforms. The steady_clock does