3 ms·
One interesting thing this (dated but still very relevant) article misses is timer coalescing. Most modern operating systems try to merge a bunch of timer acti
by jdub 11y ago
One interesting thing this (dated but still very relevant) article misses is timer coalescing.
Most modern operating systems try to merge a bunch of timer actions into a single wake/interrupt. Not only does this leave more time for other work to be done in the normal case of a loaded CPU, but if there's less demand, it provides way more opportunity for the CPU to fall into a lower power state.
Some timer APIs will let you specify how accurate you want your timer to be. Often enough, a few tens or hundreds of milliseconds doesn't really matter for your use case, but that's AEONS in CPU time!