mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
change code to quiet perl warnings.
This commit is contained in:
parent
66b53f0897
commit
0fd28a9024
@ -25,8 +25,8 @@
|
|||||||
# complete rewrite by Ken Estes, Mail.com (kestes@staff.mail.com).
|
# complete rewrite by Ken Estes, Mail.com (kestes@staff.mail.com).
|
||||||
# Contributor(s):
|
# Contributor(s):
|
||||||
|
|
||||||
# $Revision: 1.10 $
|
# $Revision: 1.11 $
|
||||||
# $Date: 2002/05/10 21:21:59 $
|
# $Date: 2002/12/09 18:15:06 $
|
||||||
# $Author: kestes%walrus.com $
|
# $Author: kestes%walrus.com $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
|
|
||||||
@ -140,9 +140,10 @@ sub untaint_digits {
|
|||||||
|
|
||||||
sub format_digits_human_readable {
|
sub format_digits_human_readable {
|
||||||
my ($num) = @_;
|
my ($num) = @_;
|
||||||
|
my $char = "G";
|
||||||
|
|
||||||
my $break = 1000_000_000;
|
my $break = 1000_000_000;
|
||||||
my $char = "G";
|
$char = "G";
|
||||||
if ($num >= $break) {
|
if ($num >= $break) {
|
||||||
my $trunc = ( $num - ($num % $break) ) / $break;
|
my $trunc = ( $num - ($num % $break) ) / $break;
|
||||||
$out = $trunc;
|
$out = $trunc;
|
||||||
@ -151,7 +152,7 @@ sub format_digits_human_readable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$break = $break / 1000;
|
$break = $break / 1000;
|
||||||
my $char = "M";
|
$char = "M";
|
||||||
if ($num >= $break) {
|
if ($num >= $break) {
|
||||||
my $trunc = ( $num - ($num % $break) ) / $break;
|
my $trunc = ( $num - ($num % $break) ) / $break;
|
||||||
$out = $trunc;
|
$out = $trunc;
|
||||||
@ -160,7 +161,7 @@ sub format_digits_human_readable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$break = $break / 1000;
|
$break = $break / 1000;
|
||||||
my $char = "K";
|
$char = "K";
|
||||||
if ($num >= $break) {
|
if ($num >= $break) {
|
||||||
my $trunc = ( $num - ($num % $break) ) / $break;
|
my $trunc = ( $num - ($num % $break) ) / $break;
|
||||||
$out = $trunc;
|
$out = $trunc;
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
|
||||||
# $Revision: 1.2 $
|
# $Revision: 1.3 $
|
||||||
# $Date: 2002/05/02 22:57:29 $
|
# $Date: 2002/12/09 18:14:07 $
|
||||||
# $Author: kestes%walrus.com $
|
# $Author: kestes%walrus.com $
|
||||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/clientbin/show_time,v $
|
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/clientbin/show_time,v $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
|
|
||||||
$t=time();
|
$t=time();
|
||||||
|
|
||||||
print (
|
$out= (
|
||||||
"The current time on ".`hostname`. "\n".
|
"The current time on ".`hostname`. "\n".
|
||||||
"UnixTime: ".$t."\n".
|
"UnixTime: ".$t."\n".
|
||||||
"LocalTime: ".localtime($t)."\n".
|
"LocalTime: ".localtime($t)."\n".
|
||||||
"GMTime: ".gmtime($t)."\n".
|
"GMTime: ".gmtime($t)."\n".
|
||||||
"\n"
|
"\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
print $out;
|
||||||
|
Loading…
Reference in New Issue
Block a user