title: Find out how long an Ajax request took to complete
body: <p>What is a good way to find out how long a particular <code>$.ajax()</code> request took?  </p>
  
  <p>I would like to get this information and then display it on the page somewhere.</p>
  
  <p><strong>ANSWER??::::</strong></p>
  
  <p>I'm new to javascript, this is the best that I could come up with if you don't want to inline the "success" function (because it will be a much bigger function)  Is this even a good way to do this?  I feel like I'm over complicating things...:</p>
  
  <pre><code>makeRequest = function(){
      // Set start time
      var start_time = new Date().getTime();
  
      $.ajax({ 
          async : true,
          success : getRquestSuccessFunction(start_time),
      });
  }
  
  getRquestSuccessFunction = function(start_time){
      return function(data, textStatus, request){
          var request_time = new Date().getTime() - start_time;
      }
  }
  </code></pre>