Measuring execution time with C++ (>= 11) standard library
(recent change : 2021-08-14) Test Environment : Windows 10 21H1 / MSVC C++ 14 Introduction What chrono(C++ >= 11) makes better than time.h(C) ? - More functionality - More precise - More convenient. Clock Types in Chrono As I know, chrono only provides three types of clock which originated from boost library. Different type of clocks is implement in chrono of boost . The clock types included in chrono are : (a) system_clock : (may not be monotonic) system-wide real time wall clock. - Could be adjusted at any time by the OS. (e.g. NTP sync. or user's action) - Based on UTC time-zone. (b) steady_clock : (monotonic) time between ticks are constant, not related with system_clock's time, every time point increases monotonically. (c) high_resolution_clock : (may be an alias of above) clock with smallest tick period. You may already see other articles, that measuring accurate, high resolution time using OS-dependent (e.g. QueryPerformanceCounter ) timer. But actu