will this code allow me to measure the time it takes to transfer an image from one PC to another?
#! perl -w
use strict;
use Net::FTP;
use Time::HiRes qw(gettimeofday tv_interval);
my $ftp = Net::FTP->new("train1", Debug =>0) or die "Cannot connect to some.host.name: $@;
$ftp->login("IT",'itadmin') or die "Cannot login ", $ftp->message;
my $return = $ftp->site('binary');
print "return = $return\n";
for (my $1 = 0; $i < 10; $i++) {
my $t0 = [gettimeofday];
$ftp->get("testfile") or die "get failed", $ftp->message;
my $t1 = [gettimeofday];
my $elapsed = tv_interval ($t0, $t1);
print $elapsed. "\n";
}
$ftp->quite;
#! perl -w
use strict;
use Net::FTP;
use Time::HiRes qw(gettimeofday tv_interval);
my $ftp = Net::FTP->new("train1", Debug =>0) or die "Cannot connect to some.host.name: $@;
$ftp->login("IT",'itadmin') or die "Cannot login ", $ftp->message;
my $return = $ftp->site('binary');
print "return = $return\n";
for (my $1 = 0; $i < 10; $i++) {
my $t0 = [gettimeofday];
$ftp->get("testfile") or die "get failed", $ftp->message;
my $t1 = [gettimeofday];
my $elapsed = tv_interval ($t0, $t1);
print $elapsed. "\n";
}
$ftp->quite;