In fact, if you need accuracy, QT does not guarantee that your timer will execute in exactly 1 ms.
At least until QT 4.7.X, if QT has an event (processed inside the event loop), all timers are checked for expiration (and then raise their signals) "in the event loop". I mean that they will not be executed as an OS event that interrupts other tasks, etc.
What you can get is a timer that runs after 1.5 seconds if any other 3 events in your loop need, for example, 0.5 seconds each.
I hope my memory does not fail, I looked at the QT timer code a few months ago, and now I canβt remember whether the timer events are processed after other events or earlier.
Hope this helps you a bit more.
kikeenrique
source share