summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Tk/Stats.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Tk/Stats.pm')
-rwxr-xr-xMaster/tlpkg/tlperl/lib/Tk/Stats.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/Tk/Stats.pm b/Master/tlpkg/tlperl/lib/Tk/Stats.pm
new file mode 100755
index 00000000000..39bedfb1a47
--- /dev/null
+++ b/Master/tlpkg/tlperl/lib/Tk/Stats.pm
@@ -0,0 +1,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;