Precision/Resolution of timing functions | How to quantify
<p>Can anyone give advice as to the </p>

<p><a href="http://en.wikipedia.org/wiki/Accuracy_and_precision" rel="nofollow">accuracy and precision</a> of timing in JavaScript?</p>

<p>I need to time user responses with a calculated accuracy and precision.</p>

<pre><code>Date().getTime
</code></pre>

<p>was the function I was thinking about using to make measurements.  I imagine the accuracy is near perfect, but I want to calculate the precision.</p>

<p>I want to emulate a user using setTimeout() so I can calculate precision of getTime().</p>

<pre><code>setTimeOut()
</code></pre>

<p>Do these two functions use the same clock?  If one varies say +10msec will the other as well effectively making my experiment to calculate precision useless?</p>

<p>Someone already did this:</p>

<p><a href="http://ejohn.org/blog/accuracy-of-javascript-time/" rel="nofollow">http://ejohn.org/blog/accuracy-of-javascript-time/</a></p>

<p>Resolution Information</p>

<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=363258" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=363258</a></p>
