X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FTimer.pm;h=4a1e1c42e165395145eb913d124bdab2007991b9;hb=c8b50d0eadda9b8afe700125aebdca510de29bb2;hp=281421f08d72394b13c54912d97fbb476d3ae0ba;hpb=a6e52cc1680c2c30ef874e2e6c16d00c956624ee;p=spider.git diff --git a/perl/Timer.pm b/perl/Timer.pm index 281421f0..4a1e1c42 100644 --- a/perl/Timer.pm +++ b/perl/Timer.pm @@ -16,6 +16,12 @@ use DXDebug; @timerchain = (); $notimers = 0; +use vars qw($VERSION $BRANCH); +$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); +$main::build += $VERSION; +$main::branch += $BRANCH; + sub new { my ($pkg, $time, $proc, $recur) = @_; @@ -25,7 +31,7 @@ sub new $self->{interval} = $time if $recur; push @timerchain, $self; $notimers++; - dbg('connll', "Timer created ($notimers)"); + dbg("Timer created ($notimers)") if isdbg('connll'); return $self; } @@ -52,7 +58,7 @@ sub handler sub DESTROY { - dbg('connll', "timer destroyed ($Timer::notimers)"); + dbg("timer destroyed ($Timer::notimers)") if isdbg('connll'); $Timer::notimers--; } 1;