If you seriously want to save battery, you might look into BLE wheel and heart rate sensors. If you mount the watch to your bars, you could also power if with an external battery or a hub generator.
40min sounds very short, my watch easily lasts more than two hours with the tinyVario app, so there might be a problem with your code as well. (tinyVario used GPS and barometric sensor, no heart rate)
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 seriously want to save battery, you might look into BLE wheel and heart rate sensors. If you mount the watch to your bars, you could also power if with an external battery or a hub generator.
40min sounds very short, my watch easily lasts more than two hours with the tinyVario app, so there might be a problem with your code as well. (tinyVario used GPS and barometric sensor, no heart rate)