I’m running an application on my Raspberry Pi, which includes the following line in a shell script,
sleep 1800
It then occurred to me that the Raspberry Pi does not have a way to keep time. How can I go about adding a driver and/or an application to get time?
The Raspberry of course has a way to keep time – like every other CPU there are timers available which can maintain some level of precision in the short term based on the CPU and other clocks.
However, the Raspberry Pi has no way to maintain real time when powered down, which is likely what you are thinking. If you need to have real-world time, use NTP at startup to synchronize Linux’s clock system to real time.