If you're worried about losing the time, the best bet is to ensure that you have some backup battery always connected to the device via a diode.
@Gordon started
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.
If you're worried about losing the time, the best bet is to ensure that you have some backup battery always connected to the device via a diode.