title: Golang http handler - time taken for request
body: <p>I am trying to set a timer to count how much time is needed for my server to finish a request and I want the timer to stop after the last byte of the response is sent. </p>
  
  <p>I found that the http server will only send the response after the handler function returns. </p>
  
  <p>Is there any way to add a callback after the response is sent ? </p>
  
  <p>Or is there a better way to count the time taken from the first byte of the request coming in till the last byte byte of the response is sent ?</p>