cpu time = user + system;
authorwenzelm
Thu Dec 01 18:44:47 2005 +0100 (2005-12-01)
changeset 1832256554bb23eda
parent 18321 3414557c2dda
child 18323 4365c8d84f69
cpu time = user + system;
lib/scripts/timestart.bash
lib/scripts/timestop.bash
     1.1 --- a/lib/scripts/timestart.bash	Thu Dec 01 18:41:46 2005 +0100
     1.2 +++ b/lib/scripts/timestart.bash	Thu Dec 01 18:44:47 2005 +0100
     1.3 @@ -13,9 +13,8 @@
     1.4  function get_times () {
     1.5    local TMP="/tmp/get_times$$"
     1.6    times > "$TMP"   # No pipe here!
     1.7 -  TIMES_RESULT="$SECONDS $(tail -1 "$TMP" | "$AUTO_PERL" -pe 's,(\d+)m(\d+)\.\d+s, $1 * 60 + $2,ge')"
     1.8 +  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')"
     1.9    /bin/rm -f "$TMP"
    1.10  }
    1.11  
    1.12  get_times  # sets TIMES_RESULT
    1.13 -
     2.1 --- a/lib/scripts/timestop.bash	Thu Dec 01 18:41:46 2005 +0100
     2.2 +++ b/lib/scripts/timestop.bash	Thu Dec 01 18:44:47 2005 +0100
     2.3 @@ -13,7 +13,7 @@
     2.4    get_times
     2.5    local TIMES_STOP="$TIMES_RESULT"
     2.6    local KIND
     2.7 -  for KIND in 1 2 3
     2.8 +  for KIND in 1 2
     2.9    do
    2.10      local START=$(echo "$TIMES_START" | cut -d " " -f $KIND)
    2.11      local STOP=$(echo "$TIMES_STOP" | cut -d " " -f $KIND)
    2.12 @@ -27,8 +27,7 @@
    2.13  
    2.14      local KIND_NAME
    2.15      [ "$KIND" = 1 ] && KIND_NAME="elapsed time"
    2.16 -    [ "$KIND" = 2 ] && KIND_NAME="user"
    2.17 -    [ "$KIND" = 3 ] && KIND_NAME="system"
    2.18 +    [ "$KIND" = 2 ] && KIND_NAME="cpu time"
    2.19      local RESULT="${HOURS}:${MINUTES}:${SECS} ${KIND_NAME}"
    2.20  
    2.21      if [ -z "$TIMES_REPORT" ]; then