mikeyp
Posts: 15
Joined: Fri Jan 06, 2012 7:30 am

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 7:56 pm

I know there is no hardware clock or battery but is there any implementation of a time clock?

The reason I ask is because I would like to run the R-Pi as a low power server and I have some applications which display the time around the house, dependent on this device. If it did, I would expect it would get the time from an NTP server online and then check periodically it hadn't drifted.

Is this a reasonable assumption or would it need a hardware clock addon through the GPIO as GERT has alluded to considering producing in another thread?

slacker
Posts: 33
Joined: Wed Dec 07, 2011 9:12 pm

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 8:25 pm

Yes, it has a system clock and assuming it has an internet connection, it will be able to get the time from an NTP server.

DaQatz
Posts: 36
Joined: Thu Aug 04, 2011 1:14 am

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 8:30 pm

You will probably have to access the ntp server fairly often. The software clocks tend to have a lot of drift.

mikeyp
Posts: 15
Joined: Fri Jan 06, 2012 7:30 am

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 8:50 pm

That's good. Don't mind how often it needs to access, just as long as it'll do. I'm probably going to hook it up to a GPS device anyway.

Thank you.

bsmulders
Posts: 18
Joined: Wed Nov 23, 2011 6:13 pm

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 9:58 pm

GPS devices need to be placed near a window though.

If this is a problem, you can try an older cellphone and use a serial connection to grab the phone's time. It will be as accurate as the phone's internal clock though. But it will work after a power outage due to the internal battery.

daemondust
Posts: 3
Joined: Sat Dec 31, 2011 12:14 am

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 10:22 pm

Once someone has written kernel i2c/smbus drivers, you should be able to attach something like a chronodot to have the time set for you on boot. The kernel supports a lot of RTCs.

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: Is there any implementation of a system clock?

Sun Jan 08, 2012 10:58 pm

DaQatz said:


You will probably have to access the ntp server fairly often. The software clocks tend to have a lot of drift.



chrony will discipline the kernel clock using corrections from either you manually entering the correct time every now and then or using NTP (if available).

Return to “General discussion”