time_duration.sh: some minor changes..
This commit is contained in:
parent
302fd34b89
commit
93a5cb9ce5
@ -18,17 +18,30 @@ function time_duration () {
|
||||
local __t_s=`expr $__t_rest_h - $__t_m \\* 60`
|
||||
|
||||
if [[ $__t_h -gt 0 ]]; then
|
||||
|
||||
if [[ $__t_h -lt 10 ]] ; then
|
||||
echo " $__t_h h : $__t_m min : $__t_s sec"
|
||||
else
|
||||
echo "$__t_h h : $__t_m min : $__t_s sec"
|
||||
__t_h=" $__t_h"
|
||||
fi
|
||||
elif [[ $__t_m -gt 0 ]]; then
|
||||
if [[ $__t_m -lt 10 ]] ; then
|
||||
echo " $__t_m min : $__t_s sec"
|
||||
else
|
||||
echo "$__t_m min : $__t_s sec"
|
||||
__t_m=" $__t_m"
|
||||
fi
|
||||
if [[ $__t_s -lt 10 ]] ; then
|
||||
__t_s=" $__t_s"
|
||||
fi
|
||||
|
||||
echo "$__t_h h : $__t_m min : $__t_s sec"
|
||||
|
||||
elif [[ $__t_m -gt 0 ]]; then
|
||||
|
||||
if [[ $__t_m -lt 10 ]] ; then
|
||||
__t_m=" $__t_m"
|
||||
fi
|
||||
if [[ $__t_s -lt 10 ]] ; then
|
||||
__t_s=" $__t_s"
|
||||
fi
|
||||
|
||||
echo "$__t_m min : $__t_s sec"
|
||||
|
||||
else
|
||||
if [[ $__t_s -lt 10 ]] ; then
|
||||
echo " $__t_s sec"
|
||||
|
Loading…
Reference in New Issue
Block a user