Hacker News new | ask | show | jobs
by ishitatsuyuki 2081 days ago
Linux has implemented hrtimer [1] a while ago and it can easily achieve sub-ms precision. You can just try some benchmark with nanosleep() on your system. It works in a similar way to the PIT you described, although I don't think it tries to offset the delay from interrupts.

What I want to say is that we already have precise timers usable on modern hardware; as for why Windows doesn't use that properly, I have no idea, but I can guess that's some technical debt in the scheduler.

[1] https://www.kernel.org/doc/ols/2006/ols2006v1-pages-333-346....