Print user, system and real time upon exit.

This commit is contained in:
Dag-Erling Smørgrav 2005-12-13 17:51:56 +00:00
parent a5b0d9050a
commit 1cd4b9861a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153381

View File

@ -70,6 +70,19 @@ my %cmds = (
);
my %kernels;
my $starttime;
BEGIN {
($starttime) = POSIX::times();
}
END {
my ($endtime, $user, $system) = POSIX::times();
my $ticks = POSIX::sysconf(&POSIX::_SC_CLK_TCK);
printf(STDERR "TB --- %.2f user %.2f system %.2f real\n",
$user / $ticks, $system / $ticks, ($endtime - $starttime) / $ticks);
}
sub message(@) {
my $msg = join(' ', @_);