Timer precision - can we improve it?

What OS are you running these tests on? Am I correct in guessing that it is Windows? When I run your test on Linux/macOS it returns {2,1}, but on Windows it is {16,18}. This is because the interrupt interval on Windows is by default 1000ms / 64 (that is 16ms), so that is the best you are going to get there unless you change that interval.

5 Likes