Changeset 365
- Timestamp:
- 08/23/06 22:58:00 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/server-newrepl/lib/MogileFS/Worker/Checker.pm
r360 r365 8 8 use LWP::UserAgent; 9 9 use POSIX; 10 use Time::HiRes qw( gettimeofday tv_interval);10 use Time::HiRes (); 11 11 12 12 use constant SUCCESS => 0; … … 80 80 foreach my $fid (List::Util::shuffle(@$fids)) { 81 81 # try to check this fid 82 my $ now = [ gettimeofday() ];82 my $t1 = Time::HiRes::time(); 83 83 my $rv = check_fid($dbh, $fid, $setting) || 0; 84 my $elapsed = tv_interval($now);84 my $elapsed = Time::HiRes::time() - $t1; 85 85 86 86 # process the return value to do something … … 158 158 my ($dbh, $fid, $level) = @_; 159 159 160 # unlocker sub to be used 160 # unlocker sub to be used 161 161 my $lockname = "mgfs:fid:$fid:check"; 162 162 my $retunlock = sub {
