/[webpac]/trunk/all2xml.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/all2xml.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 625 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));

Legend:
Removed from v.625  
changed lines
  Added in v.626

  ViewVC Help
Powered by ViewVC 1.1.26