mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
Print user, system and real time upon exit.
This commit is contained in:
parent
a5b0d9050a
commit
1cd4b9861a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153381
@ -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(' ', @_);
|
||||
|
Loading…
Reference in New Issue
Block a user