You are reading a single comment by @sauerman and its replies. Click here to read the full conversation.
  • Hi Everyone,
    is it correct and intended that setTimeout prevents the screen to turn off, while setInterval isn't?
    Also there is an error in the API Reference of setTimeout (http://www.espruino.com/Reference#l__glo­bal_setTimeout)

    If you want to stop the function from being called, pass the number that was returned by setTimeout into the clearInterval function.

    I think the function clearTimeout is meant here. Also if my statement above is correct it would be nice to have it documented :)

About

Avatar for sauerman @sauerman started