Another method
We can measure current when the device is asleep and when it is awake.
It's a question of duty cycle.
Use a solid state switch to control an analog electric clock and change the code to turn the clock on at wakeup and off just before going asleep, with your application code in the middle. Run it for a period of time (24 hrs.). Then the analog clock elapsed time divided by the total elapsed time gives the duty cycle fraction.
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.
Another method
We can measure current when the device is asleep and when it is awake.
It's a question of duty cycle.
Use a solid state switch to control an analog electric clock and change the code to turn the clock on at wakeup and off just before going asleep, with your application code in the middle. Run it for a period of time (24 hrs.). Then the analog clock elapsed time divided by the total elapsed time gives the duty cycle fraction.