javascript not counting properly <p>So I have a timer pretty much, but it doesnt count seconds, it just counts up but not in the same speed as a normal second. The application works just fine, but as i said, it counts but it doesnt count in real seconds. So question is how to change the speed. I'm also adding hundreth of a second to this. </p> <pre><code> Timer { id:ticker interval: 100; running: false; repeat: true; onTriggered: point.countIn() } </code></pre> <p>Display:</p> <pre><code>import QtQuick 2.1 Rectangle { id : display width : 320 ; height: 280 color: "#fff" function countIn() { if (seconds == 59) { seconds = 0; countOut(); } else seconds++; } function reset() { seconds = 0; } property int seconds signal countOut property int pointSize : 80 function formatOutput() { if (seconds &lt; 10) return '0' + seconds else return seconds } Text { text: formatOutput() font.pointSize: pointSize; font.bold: true font.family: "Courier" anchors.centerIn: parent } } </code></pre>