lib/scripts/timestart.bash
changeset 18327 1ee4523c831f
parent 18322 56554bb23eda
child 18364 a716d3b289ed
equal deleted inserted replaced
18326:2f57579e618f 18327:1ee4523c831f
    12 
    12 
    13 function get_times () {
    13 function get_times () {
    14   local TMP="/tmp/get_times$$"
    14   local TMP="/tmp/get_times$$"
    15   times > "$TMP"   # No pipe here!
    15   times > "$TMP"   # No pipe here!
    16   TIMES_RESULT="$SECONDS $(tail -1 "$TMP" | "$AUTO_PERL" -pe 's,(\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')"
    16   TIMES_RESULT="$SECONDS $(tail -1 "$TMP" | "$AUTO_PERL" -pe 's,(\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')"
    17   /bin/rm -f "$TMP"
    17   rm -f "$TMP"
    18 }
    18 }
    19 
    19 
    20 get_times  # sets TIMES_RESULT
    20 get_times  # sets TIMES_RESULT