If I have a permanent timer firing every 1/10 of a second or so, about how accurate should I expect it to be in the long term, compared to a real clock? Am I looking at losing a few seconds every minute or so, or will it be pretty close for longer periods? Also, is that accuracy going to be system dependent, or fairly consistent on relatively modern computers?
Thanks!
Perm Timer Precision
Re: Perm Timer Precision
It's a QTimer. Here's some info on it (https://qt-project.org/forums/viewthread/32970 and http://qt-project.org/doc/qt-5.1/qtcore ... rType-enum). We don't specify any timer type, and the default isn't documented so I have no idea what it is.
Re: Perm Timer Precision
So, I did a bit of digging in regards to Qtimers, and learned the following:
Timers of 20 ms or less will use high precision timers (error 1 ms or less).
Timers of 20 s or more will use low precision timers (error of up to 1 s).
Timers in the middle will have an error of up to 5%, and their wake times will be driven toward multiples of the timer length (but only if the timer length is itself a multiple of 50 ms).
Timers of 20 ms or less will use high precision timers (error 1 ms or less).
Timers of 20 s or more will use low precision timers (error of up to 1 s).
Timers in the middle will have an error of up to 5%, and their wake times will be driven toward multiples of the timer length (but only if the timer length is itself a multiple of 50 ms).