summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl.straw/lib/Tk/Stats.pm
blob: 39bedfb1a471cd8531533de542ccdd9d9372d3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Tk::Stats;

($lu,$ls) = times;


use vars qw($VERSION);
$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Stats.pm#4 $

sub stats
 {
  my ($u,$s) = times;
  my $du = $u-$lu;
  my $ds = $s-$ls;
  $ls = $s;
  $lu = $u;
  print sprintf(' dt=%4.2f du=%4.2f  ds=%4.2f',$du+$ds,$du,$ds);
  print sprintf('  t=%4.2f u=%4.2f   s=%4.2f',$u+$s,$u,$s);
  print ' ',shift,"\n";
 }

sub import
{
 stats($_[1]);
}

1;