Changeset 365

Show
Ignore:
Timestamp:
08/23/06 22:58:00 (2 years ago)
Author:
bradfitz
Message:

simpler API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/server-newrepl/lib/MogileFS/Worker/Checker.pm

    r360 r365  
    88use LWP::UserAgent; 
    99use POSIX; 
    10 use Time::HiRes qw( gettimeofday tv_interval ); 
     10use Time::HiRes (); 
    1111 
    1212use constant SUCCESS => 0; 
     
    8080            foreach my $fid (List::Util::shuffle(@$fids)) { 
    8181                # try to check this fid 
    82                 my $now = [ gettimeofday() ]
     82                my $t1 = Time::HiRes::time()
    8383                my $rv = check_fid($dbh, $fid, $setting) || 0; 
    84                 my $elapsed = tv_interval($now)
     84                my $elapsed = Time::HiRes::time() - $t1
    8585 
    8686                # process the return value to do something 
     
    158158    my ($dbh, $fid, $level) = @_; 
    159159 
    160     # unlocker sub to be used  
     160    # unlocker sub to be used 
    161161    my $lockname = "mgfs:fid:$fid:check"; 
    162162    my $retunlock = sub {