There is already https://banglejs.com/apps/?id=powermanager which actually does a very similar thing (just using JS) - it's got various warnings you can enable - I'm not sure if one is for high power usage over a long time but I guess it could be added.
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.
There is already https://banglejs.com/apps/?id=powermanager which actually does a very similar thing (just using JS) - it's got various warnings you can enable - I'm not sure if one is for high power usage over a long time but I guess it could be added.