|
|
Subscribe / Log in / New account

Why CLOCK_MONOTONIC?

Why CLOCK_MONOTONIC?

Posted Mar 9, 2018 20:50 UTC (Fri) by k8to (guest, #15413)
In reply to: Why CLOCK_MONOTONIC? by wahern
Parent article: Time-based packet transmission

Note of course that faulty hardware *could* cause CLOCK_MONOTONIC to misbehave, but you'd need a whole new level of faulty hardware for this, probably the kind where all software on the system will be randomly crashing.


to post comments

Why CLOCK_MONOTONIC?

Posted Mar 9, 2018 20:58 UTC (Fri) by vadim (subscriber, #35271) [Link] (1 responses)

Long ago I had a computer where time randomly jumped backwards by a second or two then resumed ticking forwards. Caused a lot of very confusing problems and baffled the hell out of me.

I'm wondering if you might know what it could have been. It was a dual CPU Athlon MP.

Why CLOCK_MONOTONIC?

Posted Mar 9, 2018 22:58 UTC (Fri) by zlynx (guest, #2285) [Link]

I seem to remember that some of these non-Intel SMP systems had problems with TSC synchronization and switching CPUs. Linux did patch it eventually. I think?

Anyway, if a program was using TSC, an AMD system might run TSC at different rates on different CPUs since TSC was actually pegged to the CPU's clock rate. Whereas on Intel TSC was a virtual clock. No matter the clock rate, TSC ran at the same speed.

I could only find this: https://github.com/Psychtoolbox-3/Psychtoolbox-3/wiki/FAQ...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds