<p>I'm using a Java socket, connected to a server. 
If I send a HEADER http request, how can I measure the response time from the server? Must I use a provided java timer, or is there an easier way?</p>

<p>I'm looking for a short answer, I don't want to use other protocols etc. Obviously do I neither want to have a solution that ties my application to a specific OS. Please people, IN-CODE solutions only. </p>

You can use time and curl and time on the command-line.  The -I argument for curl instructs it to only request the header.
```
```
time curl -I 'http://server:3000'
```
```