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__global_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 :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi Everyone,
is it correct and intended that
setTimeout
prevents the screen to turn off, whilesetInterval
isn't?Also there is an error in the API Reference of
setTimeout
(http://www.espruino.com/Reference#l__global_setTimeout)I think the function
clearTimeout
is meant here. Also if my statement above is correct it would be nice to have it documented :)