i must write the code to get time on the arm. how to start? everybody suggest now please.
There will be a hardware in your device wich is called "real time clock" in combination with a external power buffer (e.g. capaciator). Never used it, so i can give only this starting point.
If you only need a time base for the duration of "power on", you could also use a timer ISR and increment variables for seconds, minutes, hours or what ever you need.