author | wenzelm |
Thu, 14 Aug 2008 20:29:37 +0200 | |
changeset 27879 | 67d14d7c7143 |
parent 26576 | fc76b7b79ba9 |
child 29145 | b1c6f4563df7 |
permissions | -rw-r--r-- |
# -*- shell-script -*- # $Id$ # Author: Makarius # # timestart - setup bash environment for timing. # TIMES_RESULT="" function get_times () { local TMP="/tmp/get_times$$" times > "$TMP" # No pipe here! TIMES_RESULT="$SECONDS $(echo $(cat "$TMP") | perl -pe 's,\d+m\d+\.\d+s \d+m\d+\.\d+s (\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')" rm -f "$TMP" } get_times # sets TIMES_RESULT