This works well in Qt 5 Alpha and Qt 5 Beta 1, but since Beta 2 timers aren’t working as they should. You can see this for yourself with a simple example:
import QtQuick 2.0
Rectangle {
width: 360
height: 360
property int count: 0
Text {
anchors.centerIn: parent
text: count
}
Timer {
interval: 10
repeat: true
running: true
onTriggered: count++
}
}
So, I mean, that timers work well, if the interval is set higher than 100 milliseconds, but if this value is less, you’ll get slow reaction (this is right for Windows 7 ×64 platform).
I’m writing a game in which physics has to be updated with high frequency. What can I do? Try to write my own Timer component and make it into a separate thread? Any ideas?
↧