From ec0b81db1a1d3ebbae9400c9a4a32110a6b24d57 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 20 Apr 2011 10:44:05 +0200 Subject: [PATCH] add mytime script to display run time, not used time Signed-off-by: Nico Schottelius --- mytime | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 mytime diff --git a/mytime b/mytime new file mode 100755 index 0000000..64b5d4a --- /dev/null +++ b/mytime @@ -0,0 +1,9 @@ +#!/bin/sh + +START="$(date +%s)" +"$@" +END="$(date +%s)" +LENGTH=$((END-START)) +LENGTHM=$((LENGTH/60)) + +echo "Run: ${LENGTH}s ($LENGTHM minutes)"