In Perl:
my ($usr,$sys,$cusr,$csys) = times;
printf "real %s, user %s, sys %s\n", $usr + $sys, $usr, $sys;
Is this true? I read some other questions where people did things like saving the current time away in a variable and collecting it later, but why wouldn't this work?