title: How to prevent screen sleep using javascript
body: <p>I have a use case where we donot want the user who is taking a test get sleep timeout while in test which is of 3 hrs. I was looking at nosleep.js but i has cpu overuse problem as it was not working in windows.</p>
  
  <p>I was wondering how test taking apps do it, also how youtube achieves this.</p>
  
  <p>Any help on this is really appreciated </p>