Hi, i am using QTimer in my application to set the frecuency of my main loop, and trying to set the FPS of my app.
First, ill post the values i put in setInterval(), and the values i get between elapsed():
setInterval() - elapsed()
1 ------------- 1
2 ------------- 2
3 ------------- 3
... ----------- ...
19 ----------- 19
20 ----------- 20
21..31 --------- 31
32..46 --------- 46
47..62 --------- 62
etc...
I know windows have a resolution of 15.625 ms, and the results from 20 miliseconds work as expected, but under 20ms, its gives a nice 1ms resolution, so i guess QTimer uses another implementation (Multimedia timers??) when you set the interval under 20ms. I have also noticed that CPU is higher under 20 ms and drops to nearly 0 after 21 ms, so this would confirm that the more demanding multimedia timers are used.
I hope we can clarify this, as QTimer documentation is very short for this...
Bookmarks