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.
Didn't your teacher suggest how to start?
Or told you enough background for you to be able to figure out yourself what information is available so you can read up on the suitable capabilities of the processor.