/[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

Annotation of /trunk/lib/Sack.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 135 - (hide annotations)
Wed Oct 7 17:57:50 2009 UTC (14 years, 8 months ago) by dpavlin
File size: 342 byte(s)
extract duration into Sack, unify versioning [0.10]
1 dpavlin 135 package Sack;
2    
3     our $VERSION = '0.10';
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