sxmo: battery_estimate: zero-pad the minutes

This commit is contained in:
Colin 2023-07-13 02:02:25 +00:00
parent 7dc0899784
commit 5090340189

View File

@ -16,7 +16,7 @@ fmt_minutes() {
hr=$(($2 / 60))
hr_in_min=$(($hr * 60))
min=$(($2 - $hr_in_min))
echo "$1 ${hr}h${min}m"
printf "%s %dh%02dm" "$1" "$hr" "$min"
fi
}