title: JavaScript NTP time
body: <p>I'm writing a counting script who counts the time between an old date and today.<br />
  Everything worked good until I tested on a computer with wrong date and saw the results.<br />
  So I found a way to get NTP time via <a href="http://json-time.appspot.com/time.json" rel="noreferrer">http://json-time.appspot.com/time.json</a>.<br />
  The problem is that I need the current time every millisecond because I want to count the milliseconds but Its impossible the send request to the NTP server every milisecond.<br />
  This is some example code to see what I'm writing about<br /></p>
  
  <pre><code>            var today;
          $(document).ready(function(){
  
              $.data = function(success){
                  $.get("http://json-time.appspot.com/time.json?callback=?", function(response){
                      success(new Date(response.datetime));
                  }, "json");
              };
          });
  
          function update(){
              var start = new Date("March 25, 2011 17:00:00");
              //var today = new Date();
              $.data(function(time){
                  today = time;
              });
              var bla = today.getTime() - start.getTime();
              $("#milliseconds").text(bla);
          }
  
          setInterval("update()", 1);
  </code></pre>