title: How to create an accurate timer in javascript?
body: <p>I need to create a simple but accurate timer.</p>
  
  <p>This is my code:</p>
  
  <pre><code>var seconds = 0;
  setInterval(function() {
  timer.innerHTML = seconds++;
  }, 1000);
  </code></pre>
  
  <p>After exactly 3600 seconds, it prints about 3500 seconds.</p>
  
  <ul>
  <li><p>Why is it not accurate?</p></li>
  <li><p>How can I create an accurate timer?</p></li>
  </ul>