title: measuring ajax load time
body: <p>I have an $.ajax request and am saving the start time, and end time (using <code>new Date().getMilliseconds()</code>). I see a weird occurrence where sometimes I subtract <code>startTime</code> from <code>endTime</code> and get a negative number. </p>
  
  <pre><code>(function(){
      var startTime = new Date().getMilliseconds();
      $.ajax({
          url:"/url.php",
          data: someObject,
          method: "POST",
          complete:function(r){
              var endTime = new Date().getMilliseconds();
              console.log(endTime - startTime); // sometimes negative?!
          }
      });
  })();
  </code></pre>
  
  <p>Could someone please explain this? I'm sure there's a logical explanation aside from a rip in the space-time continuum. </p>
  
  <p>(If there's a better way to measure this, that'd be appreciated too!)</p>