[Qt-interest] Do QTimer Race Conditions Exist

Pau Garcia i Quiles pgquiles at elpauer.org
Thu Feb 11 22:40:20 CET 2010


Hello,

> QTimer is
> event-based, hence it can only emit its signal once it receives its
> QTimerEvent()

That limitation is most severe on Windows, where it is a pure event
counter, therefore under high CPU load you may miss ticks and your
timers will go crazy.

On X11 and Mac, it calls clock_gettime( CLK_MONOTONIC ) and you should
never miss ticks. Under high CPU load, there might be a slight delay
until the QTimerEvent which will fire the timeout() fires in general
it works very well.

IMHO QTimer should be rewritten on Windows, in terms of GetTickCount or similar.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the Qt-interest-old mailing list