Using JavaScript to record a time on the client and then how to compare the time
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8752575/how-to-apply-a-timeout-if-a-function-hasnt-been-called-1-of-n-records-in-3-seco">How to apply a timeout if a function hasn&#39;t been called 1 of N records in 3 seconds</a>  </p>
</blockquote>



<p>I'm tracking user typing. What I want to do is every time a user types, store the time the even occurred. Then set a timeout that in 3 seconds checks for values that are older than 3 seconds. For any value that is over 3 seconds perform an action.</p>

<p>What I need help with is:</p>

<ol>
<li>Given all the options, the right way to record a time on the client</li>
<li>How to compare #1's time against the current time to determine if the time is GTE 3 secs?</li>
</ol>

<p>Thanks</p>
