Hello -
Does anyone know how to add milliseconds to this timer? It displays the time in minutes and seconds but I want to add milliseconds if possible, any help would be greatly appreciated.
My code below works fine - I just want to add milliseconds.
thanks
onClipEvent (load) {
timer = "00:00";
counting = false;
startTimer = function () { counting = true;baseTime = getTimer();};
}
onClipEvent (enterFrame) {
if (counting) {
time = Math.round((getTimer()-baseTime)/1000);
seconds = time%60;
minutes = Math.floor(time/60);
secs = (seconds<10) ? "0"+seconds : seconds;
timer = "0" +minutes+":"+secs;
}
}
Does anyone know how to add milliseconds to this timer? It displays the time in minutes and seconds but I want to add milliseconds if possible, any help would be greatly appreciated.
My code below works fine - I just want to add milliseconds.
thanks
onClipEvent (load) {
timer = "00:00";
counting = false;
startTimer = function () { counting = true;baseTime = getTimer();};
}
onClipEvent (enterFrame) {
if (counting) {
time = Math.round((getTimer()-baseTime)/1000);
seconds = time%60;
minutes = Math.floor(time/60);
secs = (seconds<10) ? "0"+seconds : seconds;
timer = "0" +minutes+":"+secs;
}
}