-
Countdown timer dont show decimals
Hello guys,
im very desperate with Countdown timer im working on
Aim is to create timer that goes from 90 minutes in format 90:00 to 00:00
itried many ways how to do it (im not so skilled in expressions) right now the expression for minutes is (its cuz client wants “0” zeroes before number when its 09:00 or else minutes left.
without it worked just fine, but now with this it rounding up the “minutes number”
EG: when its 9:45 – shows as 10:45 because its 9,75 rounded up to 10… 9:29 it jumps to right minute mark, but then again on 8:59-8:30 it shows with 9. If i turn of rounding, its showing crazy numbers with x decimal numbers behind comma.
How to fix it to make it work please?
Or maybe if there is other workaround how to format regular timer that wouldnt show hours just minutes?
Thank you good people for every help!
nums = ((-time+thisComp.layer("Settings").effect("Seconds")("Slider"))/60)+thisComp.layer("controls").effect("pocet-minut")("Slider");
amtOfZeroes = 2;
isNeg = false;
if(nums < 0) { nums = Math.abs( nums ); isNeg = true; } sVal = nums.toFixed(0) + ""; while(sVal.length < amtOfZeroes) { sVal = "0" + sVal; } if(isNeg) sVal = "-" + sVal; sVal