I implemented the utilityTimer functions, but I'm not so sure how to test them. I thought that setTimeout would call that, but it doesn't, so I'm a bit puzzled.
I then noticed that jshSleep gets called with a delay of (2^63)-1 (-1?) from jsInterative. What is that supposed to do with such a value?
Could you also explain a little what jshSleep should do in general? I have the feeling that it should suspend the idle loop for the time requested, is that correct? Is there a notion of canceling a sleep?
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.
I implemented the utilityTimer functions, but I'm not so sure how to test them. I thought that setTimeout would call that, but it doesn't, so I'm a bit puzzled.
I then noticed that jshSleep gets called with a delay of (2^63)-1 (-1?) from jsInterative. What is that supposed to do with such a value?
Could you also explain a little what jshSleep should do in general? I have the feeling that it should suspend the idle loop for the time requested, is that correct? Is there a notion of canceling a sleep?