-
Digital Counter
Hi there,
and greetings from the other side of the Atlantic Ocean.
I have found this template below to generate a digital clock / stopwatch:
However, I don’t want it to work like a “real” clock but like “regular” counter, meaning that the “minute” counter should not start at 0 again, once 60 min have passed, but rather continue with 61, 62 a.s.o. (The final count should be 97:10)
I’d really appreciate it if somebody could help me out.
thanks
function padZero(n){
if (n < 10) return "0" + n else return "" + n
}t = Math.floor(effect("Slider Control")("Slider"));
hr = Math.floor(t/3600);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
/*
delete the comment tags and put in one line to add hours
padZero(hr)+":"+ */padZero(min)+":"+padZero(sec)