2 ms·
Almost every software timer follows this rule (even ones in the kernel) - "Interval timers / Thread Sleep guarantee that the amount of time waited is at least t
by xpaulbettsx 16y ago
Almost every software timer follows this rule (even ones in the kernel) - "Interval timers / Thread Sleep guarantee that the amount of time waited is at least this long, it doesn't guarantee that it is exactly this long.
As seanalltogether mentions, timers are run at the beginning of the render loop => "Run timers, layout page, render page, repeat". If you're busy doing stuff in #2 or #3 (or if your timer handler takes forever), you're not running #1.
- DaveMebs 16y agoUnless, of course, you are running a hard real-time OS, in which case kernel timers are guaranteed to fire at the exact rate specified.
- xpaulbettsx 16y agoThis is where I defer to the "almost" :)