aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-01 11:10:22 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-06 08:51:46 +0300
commitc1aef5f42968504c225af76353a6352d44e9f980 (patch)
tree50dc10b6f81bb597d2e33620ea8f499f0a0902b1
parentbb02234583f2e4a448e53f02a123afa14c85b9c5 (diff)
downloadopenembedded-core-contrib-c1aef5f42968504c225af76353a6352d44e9f980.tar.gz
openembedded-core-contrib-c1aef5f42968504c225af76353a6352d44e9f980.tar.bz2
openembedded-core-contrib-c1aef5f42968504c225af76353a6352d44e9f980.zip
build-perf-bisect: improve human-readable time format a bit
Don't print 'hours' if it's 0. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-xbuild-perf-bisect.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/build-perf-bisect.sh b/build-perf-bisect.sh
index 021271677e..99adb4280b 100755
--- a/build-perf-bisect.sh
+++ b/build-perf-bisect.sh
@@ -111,7 +111,11 @@ s_to_hms () {
_h=`echo -e "scale=0\n$1 / 3600" | bc`
_m=`echo -e "scale=0\n($1 % 3600) / 60" | bc`
_s=`echo "$1 % 60" | bc`
- printf "%d:%02d:%05.2f" $_h $_m $_s
+ if [ $_h -eq 0 ]; then
+ printf "%d:%05.2f" $_m $_s
+ else
+ printf "%d:%02d:%05.2f" $_h $_m $_s
+ fi
}
kib_to_gib () {