/[Sack]/trunk/lib/Sack.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Sack.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 146 - (show annotations)
Wed Oct 7 23:11:03 2009 UTC (14 years, 7 months ago) by dpavlin
File size: 342 byte(s)
move start_nodes and load_nodes to Sack::Lorry [0.11]
1 package Sack;
2
3 our $VERSION = '0.11';
4
5 use Exporter 'import';
6 our @EXPORT = qw(duration);
7
8 our $t = time;
9 our $log_fh;
10
11 sub duration {
12 my $now = time;
13 my $d = $now - $t;
14 my $message = sprintf "%.4fs %s\n", $d, join(' ',@_);
15 print $message;
16 open( $log_fh, '>', '/tmp/sack.log' ) unless $log_fh;
17 print $log_fh $message;
18 $t = $now;
19 }
20
21 1;

  ViewVC Help
Powered by ViewVC 1.1.26