title: Is SetInterval() to milliseconds too much for browser?
body: <p>I have made a JavaScript Stopwatch that works by incementing the value of a variable every second (using <code>setInterval(stopwatchValue, 1000)</code>). I have some issues though: if the user hits pause at, say, 3.8 seconds, the actual pause value will be 3 seconds (when they click resume, the stop watch will continue from 3.0 seconds instead of 3.8).</p>
  
  <p>I DO have a solution to fix this. My idea is too update the stopwatch every split second by doing something like <code>setInterval(stopwatchValue, 1)</code>.</p>
  
  <p>My question is: Is it too much for the browser to handle this code every split second:</p>
  
  <pre><code>function stopwatchValue("result") {
      document.getElementById("result").innerHTML = timer;
      timer++; 
  }
  </code></pre>
  
  <p>ALSO: Some people have said you should avoid accessing the DOM more than once if you can. In my case, would it work if I replaced my above code with:</p>
  
  <pre><code>var displayResultHere = document.getElementById("result");
  function stopwatchValue("result") {
      displayResultHere = timer;
      timer++; 
  }
  </code></pre>
  
  <p>My Stopwatch: hntr.atwebpages.com/stopwatch/stopwatch.html</p>