[timers] unify get_time_from_boot() methods shared between cortex-m, avr8 and msp430