I want the output to print the value from roundedLeftSecs (which is leftTime rounded to three places) but when I don't hardcode the roundedLeftSecs in it will produce many trailing zeros after the rounded number.

I have found that %1$d is a decimal placeholder but it won't let me use that with a float or a double expression so I am unsure how to get rid of this zeros or if it is even possible.