Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: elapsed connection response time

by BrowserUk (Patriarch)
on Jul 25, 2007 at 15:47 UTC ( [id://628708]=note: print w/replies, xml ) Need Help??


in reply to elapsed connection response time

Is this accurate enough for your purposes?

#! perl -slw use strict; use Time::HiRes qw[ time ]; use IO::Socket::INET; my $s = IO::Socket::INET->new( 'www.bbc.co.uk:80' ) or die "$!, $^E"; my $start = time; print {$s} 'GET //realmedia/fmg2.ram HTTP/1.0', "\n"; my $read; read( $s, $read, 15 ); printf "First 15 bytes ('$read') took %.3f seconds\n", time() - $start +; __END__ C:\test>junk5 First 15 bytes ('HTTP/1.1 200 OK') took 0.402 seconds C:\test>junk5 First 15 bytes ('HTTP/1.1 200 OK') took 0.572 seconds

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://628708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-20 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found