mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Simplify some Perl.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6569
This commit is contained in:
parent
7825ba9858
commit
a01fea1a7a
@ -240,9 +240,9 @@ sub time_prog($$)
|
||||
die "\n*** Command returned non-zero ($retval)"
|
||||
. "\n*** See perf.{cmd,stdout,stderr} to determine what went wrong.\n";
|
||||
my $out = `cat perf.stderr`;
|
||||
($out =~ /[Uu]ser([ ]+)([\d\.]+)/) or
|
||||
($out =~ /[Uu]ser +([\d\.]+)/) or
|
||||
die "\n*** missing usertime in perf.stderr\n";
|
||||
$tmin = $2 if ($2 < $tmin);
|
||||
$tmin = $1 if ($1 < $tmin);
|
||||
}
|
||||
# Avoid divisions by zero!
|
||||
return (0 == $tmin ? 0.01 : $tmin);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user