I would like to know if a QTimer will keep on counting once it has timed out.
For example, let’s say I have a QTimer that times out every 500ms. Let’s say when this particular QTimer times out, my program happens to be in some function that I have made (not in the event loop) and it takes 10ms for the program to get from my function, to the event loop. Does that mean that the next time the QTimer times out will be at 1010ms?
If this is the case, is there a way to get around it?
Thanks.
Edit:

I made some test using multiple timers but with
timerEvent(QObject::setTimer()).The thing is, of course if you have multiple timers that interfere at some point (tick exactly in the same time) all your
doStuffThatTake10mscode will be ‘queued’ … But the absolute precision of timers should remain over time. Here some code to try it out.Implementation .cpp
To try it out create
a = QApllication()and aMultiTimerobject and firea.exec().Result after 1 minute on linux
As you can see the 121th tick of
timer 0is right on time at60500ms… but at60000msall timers collide creating delayed execution.