That's really odd - so you're saying that the timeout value reported in setTimeout isn't decrementing fast enough? But it works on a 'clean' Puck.js, just not with your code?
If you're waiting 'a few minutes' then 6869723.54125976562-6712184.47875976562=157539.06249999906 - so 160ish seconds, which sounds about right.
By contrast, 2236-1282 from getTime is around 15 minutes.
Honestly I'm not too sure what could be the issue here. As far as I know nothing has changed in the setTimeout code in years. Is there any way you could start pulling code out of your greenhouse controller until you can get it down to a level that I could look at it and reproduce it?
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.
That's really odd - so you're saying that the timeout value reported in
setTimeout
isn't decrementing fast enough? But it works on a 'clean' Puck.js, just not with your code?If you're waiting 'a few minutes' then 6869723.54125976562-6712184.47875976562=157539.06249999906 - so 160ish seconds, which sounds about right.
By contrast,
2236-1282
fromgetTime
is around 15 minutes.Honestly I'm not too sure what could be the issue here. As far as I know nothing has changed in the setTimeout code in years. Is there any way you could start pulling code out of your greenhouse controller until you can get it down to a level that I could look at it and reproduce it?