-
Another Countdown Question
In using the below formula, how do I adjust it to countdown NOT showing minetes but past 60 on the seconds. Say starting at 87:00 secs and counting down. I’ve played with it abit but just can’t get the formula right to do this. Any help is appreciated.
//countdown clock in miliseconds
ClockStart = 20; //Start time in minutes
start = ClockStart*60; //start time in seconds
compTime = start – time;
eTime = Math.floor(compTime);
csec = Math.floor((compTime – eTime)*100);
ms1 = Math.floor(csec/10);
ms2 = csec%10;
hr = Math.floor(eTime/3600);
h1 = Math.floor(hr/10);
h2 = hr%10;
min = Math.floor((eTime – hr*3600)/60);
m1 = min;
m2 = min%10;
sec = eTime – hr*3600 – min*60;
s1 = Math.floor(sec/10);
s2 = sec%10;
m1 + ‘:’ + s1 + s2 + ‘.’ + ms1 + ms2