According to the Linux man page under Ubuntu
CLOCK_MONOTONIC
Clock that cannot be set and represents monotonic time since
some unspecified starting point.
CLOCK_MONOTONIC_RAW (since Linux 2.6.28; Linux-specific)
Similar to CLOCK_MONOTONIC, but provides access to a raw hard‐
ware-based time that is not subject to NTP adjustments.
According to the webster online dictionary Monotonic means:
2: having the property either of never increasing or of never
decreasing as the values of the independent variable or the subscripts
of the terms increase.
In other words, it won't jump backwards. I can see that this would be an important property if you were timing some code.
However, the difference between the normal and raw version isn't clear. Can someone shed some light into how NTP can still affect CLOCK_MONOTONIC?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…