Hi,
I'm developing a game for wrt. And in that game I have a timer which counts the time, spent for each new game. But, there is a problem in timer. When I touch in any part of the screen and hold my finger in there, the timer stops until I hold up. What could be the problem, can you help me on that?
Here is the code of timer;
Code:interval = setInterval(function(){ var totalTime = parseInt($("#total_time").attr("time")); totalTime += 10; var ms = (totalTime % 100); var sec = Math.floor(totalTime / 100); $("#total_time").html((sec < 100 ? ((sec < 10 ? "00" : "0") + sec) : sec) + ":" + (ms < 10 ? "0" + ms : ms)); $("#total_time").attr("time", totalTime); }, 100);

Reply With Quote


