title: how to check if its been 10 seconds or more than 10 seconds when web page is inactive?
body: <p>How can we set in javascript or jquery for example:</p>
  <pre><code>time = 0; //0 second
  // and time will start by 1 second to infinite second
  if(time &lt;= 10) {  // 10 is 10 second here
      alert(&quot;abc&quot;);
  } else {
      alert(&quot;xyz&quot;);
  }
  </code></pre>
  <p>Suppose web page is loaded and time should increment by 1 second and when it has been 10 second it should alert abc and when more than 10 second it should alert xyz</p>
  <p><strong>The whole process should run automatically when page is loaded not by clicking on start and end button</strong></p>
  <p>Please help me to find it? Thanks in advance.</p>