File Coverage

blib/lib/WWW/Spinn3r/Common.pm
Criterion Covered Total %
statement 3 11 27.2
branch 0 2 0.0
condition n/a
subroutine 1 4 25.0
pod 0 3 0.0
total 4 20 20.0


line stmt bran cond sub pod time code
1             package WWW::Spinn3r::Common;
2 2     2   211519 use Time::HiRes qw(time gettimeofday tv_interval);
  2         4697  
  2         11  
3              
4             sub debug {
5              
6 0     0 0   my ($self, $msg) = @_;
7 0 0         print "debug: (WWW::Spinn3r) $msg\n" if $self->{debug};
8              
9             }
10              
11             sub start_timer {
12              
13 0     0 0   my ($self);
14 0           return { now => [gettimeofday] };
15              
16             }
17              
18             sub howlong {
19              
20 0     0 0   my ($self, $time) = @_;
21 0           my $interval = tv_interval ( $$time{now}, [gettimeofday] );
22 0           my $m = sprintf("%5.3f", $interval);
23 0           return $m;
24              
25             }
26              
27             1;