Parent Directory | Revision Log | Patch
revision 623 by dpavlin, Sat Jan 1 19:09:53 2005 UTC | revision 626 by dpavlin, Sun Jan 2 00:53:33 2005 UTC | |
---|---|---|
# | Line 687 print STDERR "reading ./import_xml/$type | Line 687 print STDERR "reading ./import_xml/$type |
687 | my $current = shift; | my $current = shift; |
688 | my $total = shift || 1; | my $total = shift || 1; |
689 | my $p = int($current * 100 / $total); | my $p = int($current * 100 / $total); |
690 | if ($p != $last_p) { | if ($p < $last_p) { |
691 | $start_t = time(); | |
692 | } elsif ($p != $last_p) { | |
693 | my $rate = ($current / (time() - $start_t || 1)); | my $rate = ($current / (time() - $start_t || 1)); |
694 | my $eta = ($total-$current) / ($rate || 1); | my $eta = ($total-$current) / ($rate || 1); |
695 | printf STDERR ("%5d [%-38s] %-5d %0.1f/s %s\r",$current,"=" x ($p/3)."$p%>", $total, $rate, fmt_time($eta)); | printf STDERR ("%5d [%-38s] %-5d %0.1f/s %s\r",$current,"=" x ($p/3)."$p%>", $total, $rate, fmt_time($eta)); |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |