#!/usr/bin/perl
use WWW::Curl::Easy;
my $curl = new WWW::Curl::Easy;
$starttime = time();
$curl->setopt(CURLOPT_URL, 'http://tw.yahoo.com/');
$curl->perform;
$endtime = time();
my $err = $curl->errbuf;
my $info = $curl->getinfo(CURLINFO_HTTP_CODE);
$resulttime = $endtime - $starttime;
print "\n",'result time => ',$resulttime,"\n";
use WWW::Curl::Easy;
my $curl = new WWW::Curl::Easy;
$starttime = time();
$curl->setopt(CURLOPT_URL, 'http://tw.yahoo.com/');
$curl->perform;
$endtime = time();
my $err = $curl->errbuf;
my $info = $curl->getinfo(CURLINFO_HTTP_CODE);
$resulttime = $endtime - $starttime;
print "\n",'result time => ',$resulttime,"\n";
全站熱搜
留言列表