Meilleur suivi du temps MPD
This commit is contained in:
parent
c2f8030e58
commit
b7cfb58c00
1 changed files with 4 additions and 2 deletions
|
@ -32,9 +32,11 @@ human_time() {
|
||||||
fi
|
fi
|
||||||
local minutes=$(( $seconds / 60 ))
|
local minutes=$(( $seconds / 60 ))
|
||||||
seconds=$(( $seconds % 60 ))
|
seconds=$(( $seconds % 60 ))
|
||||||
if [[ "$minutes" -ge 90 ]]
|
if [[ "$minutes" -ge 60 ]]
|
||||||
then
|
then
|
||||||
printf "%5s\n" "${minutes}m"
|
local hours=$(( $minutes / 60 ))
|
||||||
|
minutes=$(( $minutes % 60 ))
|
||||||
|
printf "%02dh%02d\n" "$hours" "$minutes"
|
||||||
else
|
else
|
||||||
printf "%02d:%02d\n" "$minutes" "$seconds"
|
printf "%02d:%02d\n" "$minutes" "$seconds"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue