mytime 193 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
#!/bin/sh

START="$(date +%s)"
"$@"
END="$(date +%s)"
LENGTH=$((END-START))
LENGTHM=$((LENGTH/60))

echo "Run: ${LENGTH}s ($LENGTHM minutes)"
Nico Schottelius's avatar
Nico Schottelius committed
10 11 12

# Record values
echo "$@; ${LENGTH}" >> ~/.mytime