[SCM] Video extraction utility for YouTube, Google Video and other video sites (Debian packaging) branch, master, updated. upstream/2.1.7-214-g6762190
legatvs
legatvs at gmail.com
Wed Apr 1 14:44:58 UTC 2009
The following commit has been merged in the master branch:
commit 12cc0fa875118fb2cec440f5193c492f67f41e26
Author: legatvs <legatvs at gmail.com>
Date: Sat Mar 14 18:48:52 2009 +0200
Remove normalize_rate subroutine.
diff --git a/clive b/clive
index 80f3432..ea3e735 100755
--- a/clive
+++ b/clive
@@ -899,9 +899,9 @@ sub dot_finish {
sub dot_print_row_stats {
my ($percent, $elapsed, $eta, $rate, $last) = @_;
- my %rate = normalize_rate($rate);
+ my ($unit,$_rate) = get_units($rate);
- printf "%3d%% %4.1f%s", $percent, $rate{rate}, $rate{units};
+ printf "%3d%% %4.1f%s", $percent, $_rate, $unit;
printf "%s%s", $last ? "=":" ", $eta;
}
@@ -1059,25 +1059,6 @@ sub get_units {
return ($units[$i],$rate);
}
-sub normalize_rate {
- my $rate = shift;
-
- my @names = qw/KB MB GB/;
- my $units;
-
- if ( $rate < 1024*1024 ) {
- $units = 0;
- $rate /= 1024;
- } elsif ( $rate < 1024*1024 ) {
- $units = 1;
- $rate /= 1024*1024;
- } else {
- $units = 2;
- $rate /= 1024*1024*1024;
- }
- return (rate => $rate, units => $names[$units]);
-}
-
# Subroutines: LittleHelpers
--
Video extraction utility for YouTube, Google Video and other video sites (Debian packaging)
More information about the Pkg-perl-cvs-commits
mailing list