summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-07 12:22:53 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-08 09:28:41 (GMT)
commit59a8e0200b912481ff750401ef10c588ad9bd872 (patch)
tree41a1a59bb9320d87cbac6b3c0cf31e16ba902ec7 /doc
parent9701f97b6f14e25b405adb7e82ef0ec93a6b8a0f (diff)
downloadQt-59a8e0200b912481ff750401ef10c588ad9bd872.zip
Qt-59a8e0200b912481ff750401ef10c588ad9bd872.tar.gz
Qt-59a8e0200b912481ff750401ef10c588ad9bd872.tar.bz2
Don't use QTime::elapsed() on windows to query for the actual time.
It seems that the time spent between the execution of QTime::start() and QTime::elapsed() can be higher than what QTime::elapsed() sometimes reports. (To put it differently, QTime::elapsed() was sometimes returning a time that was *less* than the actual time spent.) Note that this is *not* a bug on Windows, since GetLocalTime explicitly mentions that we should not use local system times to to relative comparisions (this is what elapsed() currently do). This is also partly reflected by the documentation of QTime::elapsed(), where it says that the result of elapsed() is undefined if the clock setting has been changed. Due to the fact mentioned in the above paragraph this is also a potential problem on other platforms (at least Linux and Mac). However, these platforms do not suffer from the immediate problem we observed on windows (that QTime::elapsed() could return a too small value), so this commit only fixes the problem on Windows (it now uses GetTickCount instead of QTime). For the other platforms the behaviour should be unchanged, since we still use QTime. This was found by running the QPauseAnimation autotest, where some tests were unstable (and failed). However, it did not fail on all windows systems. (Luckilly it failed on my Win 7 system) Reviewed-by: Leo
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions