I intend to make timer app that can run in the background
Is there any chance you could just use/update the existing alarm app - since that handles timers too? You could then just make your app update alarm.json with the timers it wants scheduled.
Does that mean that the clearInterval effectively only applies until alarm.js is done?
Yes, that's right - because alarm.js either uses load to load another app straight away, or is displays a fullscreen message.
another load of alarm.js?
No, I don't think so... Once load(...) is called it's like a complete restart - it gets rid of everything and starts from scratch
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.
Is there any chance you could just use/update the existing alarm app - since that handles timers too? You could then just make your app update
alarm.json
with the timers it wants scheduled.Yes, that's right - because alarm.js either uses
load
to load another app straight away, or is displays a fullscreen message.No, I don't think so... Once
load(...)
is called it's like a complete restart - it gets rid of everything and starts from scratch