ARTICLE AD BOX
No clock keeps perfect time. Though atomic clocks get really darn close. Quartz-based clocks can loose or gain several seconds per week. And the hardware clock inside your computer is no better than a quartz clock.
system_clock uses your computer's hardware clock as part of its implementation. But to keep it from drifting like your wrist watch might, it occasionally (several times a day) asks another computer what the correct time is. And this other computer is (indirectly) hooked up to an atomic clock. So several times a day, your system_clock is correcting itself, on the order of microseconds, or maybe even milliseconds, to the correct time. And sometimes these corrections can be in the negative direction.
I don't know this for sure, but if your system is experiencing heavy load for long periods of time, the process that handles the NTP server (the process asking another computer for the current time) might be not be running as often (lower priority). And thus the corrections to the current time could be getting larger because they are less frequent. Your system_clock might only jump backwards when the correction is large enough, and otherwise implement negative adjustments by just not ticking for a short while.
An interesting experiment would be to report t1 - t2 when the backwards jump happens, and how long it has been since the last backwards jump.
226k55 gold badges495 silver badges624 bronze badges
Explore related questions
See similar questions with these tags.
