Skip to content
Snippets Groups Projects
Commit 414180b3 authored by Yang Tse's avatar Yang Tse
Browse files

gettimeofday() requires perl version newer than 5.6

parent 7603a29f
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ require "getpart.pm"; ...@@ -44,7 +44,7 @@ require "getpart.pm";
require "ftp.pm"; require "ftp.pm";
BEGIN { BEGIN {
if($] >= 5.006) { if($] > 5.006) {
use Time::HiRes qw( gettimeofday ); use Time::HiRes qw( gettimeofday );
} }
} }
...@@ -71,7 +71,7 @@ sub getlogfilename { ...@@ -71,7 +71,7 @@ sub getlogfilename {
# #
sub logmsg { sub logmsg {
my $now; my $now;
if($] >= 5.006) { if($] > 5.006) {
my ($seconds, $usec) = gettimeofday(); my ($seconds, $usec) = gettimeofday();
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($seconds); localtime($seconds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment