diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index 06f2aea..d76ff74 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -232,9 +232,10 @@ sub backup2disk { $list_cfd->printflush("list $target->{dir}\n"); # XXX - encode! close($list_cfd); my $count = 0; + my $last_report = $self->{start_time}; while (<$list_dfd>) { + my $now = time(); if ($target->{timeout}) { - my $now = time(); my $elapsed = $now - $self->{start_time}; $self->log(10, "checking timeout " . $elapsed . " > " . $target->{timeout}); if ($elapsed > $target->{timeout}) { @@ -248,8 +249,9 @@ sub backup2disk { # split into fields chomp; my $f = $self->parse($_); - if ($count % 1000 == 0) { + if ($now - $last_report >= 10) { $self->log(9, "file $count: $f->{name}"); + $last_report = $now; } my $success = 1;