title: Is it possible to find out what is the monitor frame rate in javascript?
body: <ol>
  <li>First, Is it possible to find out
  what is the monitor frame/refresh rate in
  javascript (60Hz for most LCD monitors)? </li>
  <li>Second, is there any way
  to say execute a function after
  every X frames?</li>
  </ol>
  
  <p>Several people asked why I need this. Here is the context: I have an animation (an endless loop that renders one frame after another). The output of each iteration needs to be synchronized with monitor refresh rate, otherwise <a href="http://en.wikipedia.org/wiki/Screen_tearing" rel="noreferrer">tearing</a> will happen. The way I am doing it right now is to use <code>setTimeout(loop, 16)</code> within the <code>loop</code> method. Its sort of working. The second parameter needs to be 1/(refresh rate), and that is why I asked this question.</p>