summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-10-15 11:05:40 +0100
committerMichael Allen <michael@michaelallen.io>2015-10-15 11:05:40 +0100
commit6c4678f6fcee69997bc72c532d349e6ef132794e (patch)
tree0b6aa75e3500ede4a867f8faa5af714b1e16677d /radar-base.sh
parentb2590d577d2428264efe2d18f2d50a296d3bcfae (diff)
parent6b488da633c28f58f4833bb035cb727eca1d176d (diff)
downloadgit-sonar-6c4678f6fcee69997bc72c532d349e6ef132794e.tar.gz
git-sonar-6c4678f6fcee69997bc72c532d349e6ef132794e.zip
Merge branch 'master' of github.com:michaeldfallen/git-radar into format-string
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index d5456d0..23e3dfd 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -5,6 +5,14 @@ cwd=""
remote=""
rcfile_path="$HOME"
+timethis() {
+ cmd="$@"
+ start=$(gdate +%s.%N)
+ eval $cmd
+ dur=$(echo "$(gdate +%s.%N) - $start" | bc)
+ echo "$1 - $dur" >> $HOME/duration.dat
+}
+
prepare_bash_colors() {
if [ -f "$rcfile_path/.gitradarrc.bash" ]; then
source "$rcfile_path/.gitradarrc.bash"