summaryrefslogtreecommitdiff
path: root/nocompile
diff options
context:
space:
mode:
Diffstat (limited to 'nocompile')
-rwxr-xr-xnocompile/bin/elapsedtime5
1 files changed, 4 insertions, 1 deletions
diff --git a/nocompile/bin/elapsedtime b/nocompile/bin/elapsedtime
index ff7ea52..f17d326 100755
--- a/nocompile/bin/elapsedtime
+++ b/nocompile/bin/elapsedtime
@@ -14,7 +14,10 @@ days=$(( wholes/60/60/24 ))
#days=$(( wholes/60/60/24 % 7 ))
#weeks=$(( wholes/60/60/24/7 ))
#echo $weeks weeks $days days $hours:$minutes:$seconds.$partials
-echo -n $days days $hours:$minutes:$seconds
+if [ "_$days" != "_0" ];then
+ printf '%d days ' "$days"
+fi
+printf "%02d:%02d:%02d" "$hours" "$minutes" "$seconds"
if [ "_$partials" != "_" ];then
echo .$partials
else