My firmware goes into system off state when idle and wakes on GPIO (button input). I want to display an indication to the user for a fixed duration, so I will modify the bootloader to set the GPIO output, but I need to know how long the bootloader took to boot as I then need to subtract this from the duration the firmware waits before ending the indication.
So is there a way to measure the bootloader boot duration and pass this to the application? Or is there a timer which starts on boot that I can read?