monotonic clock and wall clock

monotonic clock

monotonic(单调) clock 是在程序内部的计时器,用于测量过去的时间,是不受用户修改系统时间的影响。

To safely measure elapsed time in a program, you need a clock that ticks out time continuously, without any jumps when a user sets the system time. This kind of clock is called a monotonic clock. This article takes a look at the different monotonic clock functions available in the Windows and POSIX APIs, and the cross-platform routines introduced in C++11.

wall clock

用户时钟,date命令显示的时钟。

相关文章: