title: Calculating time for download and repeating the download for n times
body: <p>I am trying to download a file from the server and want to calculate the time taken for that particular download and display it. Below is the code which is used to download but I am finding difficulty in calculating the time and displaying it. Important point is I might end up running the code several times on one click, I mean, the code should run for few times, say 15 times and I need to calculate time for every iteration and should display all the values to the user. Can anyone please help me in this? I am new to programming that’s why I might be asking very silly doubts but please don’t mind.  </p>
  
  <pre><code>&lt;html&gt;
  
      &lt;head&gt;
      &lt;script src="jQuery.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
      $.ajax({
          url: "input.txt",
          })
  
      .done(function(data){
          $("#textResponse").val(data);      
      })
  
     &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;textarea rows="50" cols="90" id="textResponse"&gt;&lt;/textarea&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>