is it correct and intended that
setTimeout prevents the screen to turn off, while
Also there is an error in the API Reference of
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 :)