>> use LWP::UserAgent; >> use LWP::Protocol; >> >> LWP::Protocol::implementor('http', 'LWP::Protocol::http::Timed'); >> >> my $ua = new LWP::UserAgent; >> my $response = $ua->get("http://thegestalt.org"); >> printf "%f\n", $response->header('X-Request-Connect-Time');
These timers are also available: $response->header('X-Request-Transmit-Time') $response->header('X-Response-Server-Time') $response->header('X-Response-Receive-Time')