<p>I have two laptops running astronomy projects but the clocks are imprecise. I set the specialpollinterval to update the time to windows time once a day 86400s. This eventually worked after I set the minpollinterval to be less than specialpollinterval but it updates about 70 times a day and the clocks are still 2-3 seconds wrong compared with my phone and PC. Both laptops are connected to the web and all other settings in the time related registry are default.  Can anyone suggest why the clocks are still different and not the same as my other devices?  Is there a better way to get accurate time?
The laptops are windows 7.</p>

CC BY-SA 4.0
2022-11-01T20:59:57.197Z
Is [this answer](https://astronomy.stackexchange.com/a/50412/23748) written by yours truly any use ?
astrosnapper
CC BY-SA 4.0
2022-11-01T23:32:39.333Z
astrosnapper's comment seems helpful; maybe the best way forward is to completely stop relying on Windows 7 for time support and use a clock synched to GPS. I like the Raspberry Pi solution. In addition to getting time stamps from the GPS data stream some units provide a 1-pulse-per-second output, and you can use that to occasionally trigger a time update on a [real time clock module](https://www.google.com/search?q=real+time+clock+module). That doesn't help with your phone (unless you use a Bluetooth or WiFi connection to the Pi) but perhaps the (modern?) cellphone's clock is closer to true?
uhoh
CC BY-SA 4.0
2022-11-01T23:36:55.843Z
I think you can ask a *different but related question* in [Raspberry Pi SE](https://raspberrypi.stackexchange.com/) or [Arduino SE](https://arduino.stackexchange.com/) (and link back here) but those questions will need a lot more technical details to avoid being closed as "unclear what you're asking". You could also ask separately about your time problem with Windows 7 in [Superuser](https://superuser.com/). Basically I'm suggesting a "divide and conquer" approach; break this down into a few smaller problems, and explain each one in more detail in a site related to that specific problem.
uhoh
CC BY-SA 4.0
2022-11-01T23:38:01.533Z
But definitely keep this Astronomy-related question here also. Perhaps there will be someone who's solved this or a similar problem here.
uhoh
CC BY-SA 4.0
2022-11-02T00:33:13.837Z
Precision timekeeping is complicated, even without clock drift. https://www.ucolick.org/~sla/leapsecs/epochtime.html https://www.ucolick.org/~sla/leapsecs/amsci.html https://www.ucolick.org/~sla/leapsecs/right+gps.html
PM 2Ring
CC BY-SA 4.0
2022-11-02T01:55:58.823Z
There is something wrong with your setup.  My computers stay synced to well under a second with no special provisions.  If you run a local time server and have them sync to that, they should be within milliseconds of each other.  One common source of a drifting clock is a failing CMOS battery.
Greg Miller
CC BY-SA 4.0
2022-11-02T11:22:33.673Z
@GregMiller Or maybe the laptops are outside. Or maybe they're very cheap and have a correspondingly cheap and inaccurate clock. Or maybe they're old and the clock is degrading. Or maybe they're old and have a failing battery. They are laptops running Windows 7, support for which expired almost three years ago.
David Hammen
CC BY-SA 4.0
2022-11-02T16:56:06.200Z
@uhoh A windows NTP client will keep a computer clock accurate to a few milliseconds over the network ([example plots](https://www.satsignal.eu/ntp/Win-7_to_Win-10_upgrade.html)) no local GPS needed. This is because it's compensating for the clock drift (which can have hundreds of PPM drift) and not just doing a timestep every "poll interval" seconds like the native Wintime
astrosnapper
CC BY-SA 4.0
2022-11-02T21:50:59.050Z
@astrosnapper I think I see; a "Windows NTP client" is something you download and install and which *tries to* compensate for (at least a) slowly changing rate of clock drift, and "the native Wintime" is what Windows 7 and other versions use by default for system time? A laptop running out in the field (especially an old one) may have a more variable internal temperature due to loading, internal fan that turns on and off and power saving features than a big PC with continuous big fan running on a desk indoors, but yes I am sure an NTP client is better than the default Windows thingy.
uhoh
CC BY-SA 4.0
2022-11-03T11:48:58.857Z
Thats great help, I think I will configure one of the laptops as ntp server for the other one as they are on all the time whilst the PC is not. Also might have to shut down and replace the cmos batteries. One laptop is connected via internet over power line and the other by a wifi extender both through the router. Do you think that would make a difference?
user36093
CC BY-SA 4.0
2022-11-03T15:14:18.093Z
NTP works best and assumes symmetric network delays but I think that will be OK over power line and the wifi extender - it's more of an issue over ADSL or cable modem connections. If your CMOS battery is possibly dead, you want to make sure `ntpd` is started with the `-g` flag as in this [screenshot](https://1drv.ms/u/s!AsIWxefRvOMTlBThJveIbcDCPnMS?e=JyATqn) so it will startup even if the initial clock step is >1000s
astrosnapper
CC BY-SA 4.0
2022-11-05T03:59:07.317Z
@user36093 it's always okay to answer your own question; if you find a solution and/or source of the big time error, please consider stopping by and writing it up as (at least a short) answer post. *Thanks!*
uhoh
<observational-astronomy>
How do you keep your astronomy computer precisely on time?
user36093
# How do you keep your astronomy computer precisely on time?

(Asked by: username_0 on 2022-11-01)

I have two laptops running astronomy projects but the clocks are imprecise. I set the specialpollinterval to update the time to windows time once a day 86400s. This eventually worked after I set the minpollinterval to be less than specialpollinterval but it updates about 70 times a day and the clocks are still 2-3 seconds wrong compared with my phone and PC. Both laptops are connected to the web and all other settings in the time related registry are default. Can anyone suggest why the clocks are still different and not the same as my other devices? Is there a better way to get accurate time?
The laptops are windows 7.

**Tags:** observational-astronomy

> **Comments:**
> **username_1**: Is [this answer](https://astronomy.stackexchange.com/a/50412/23748) written by yours truly any use ?  
> **username_2**: username_1's comment seems helpful; maybe the best way forward is to completely stop relying on Windows 7 for time support and use a clock synched to GPS. I like the Raspberry Pi solution. In addition to getting time stamps from the GPS data stream some units provide a 1-pulse-per-second output, and you can use that to occasionally trigger a time update on a [real time clock module](https://www.google.com/search?q=real+time+clock+module). That doesn't help with your phone (unless you use a Bluetooth or WiFi connection to the Pi) but perhaps the (modern?) cellphone's clock is closer to true?  
> **username_2**: I think you can ask a *different but related question* in [Raspberry Pi SE](https://raspberrypi.stackexchange.com/) or [Arduino SE](https://arduino.stackexchange.com/) (and link back here) but those questions will need a lot more technical details to avoid being closed as "unclear what you're asking". You could also ask separately about your time problem with Windows 7 in [Superuser](https://superuser.com/). Basically I'm suggesting a "divide and conquer" approach; break this down into a few smaller problems, and explain each one in more detail in a site related to that specific problem.  
> **username_2**: But definitely keep this Astronomy-related question here also. Perhaps there will be someone who's solved this or a similar problem here.  
> **username_3**: Precision timekeeping is complicated, even without clock drift. https://www.ucolick.org/~sla/leapsecs/epochtime.html https://www.ucolick.org/~sla/leapsecs/amsci.html https://www.ucolick.org/~sla/leapsecs/right+gps.html  
> **username_4**: There is something wrong with your setup.  My computers stay synced to well under a second with no special provisions.  If you run a local time server and have them sync to that, they should be within milliseconds of each other.  One common source of a drifting clock is a failing CMOS battery.  
> **username_5**: @username_4 Or maybe the laptops are outside. Or maybe they're very cheap and have a correspondingly cheap and inaccurate clock. Or maybe they're old and the clock is degrading. Or maybe they're old and have a failing battery. They are laptops running Windows 7, support for which expired almost three years ago.  
> **username_1**: @username_2 A windows NTP client will keep a computer clock accurate to a few milliseconds over the network ([example plots](https://www.satsignal.eu/ntp/Win-7_to_Win-10_upgrade.html)) no local GPS needed. This is because it's compensating for the clock drift (which can have hundreds of PPM drift) and not just doing a timestep every "poll interval" seconds like the native Wintime  
> **username_2**: @username_1 I think I see; a "Windows NTP client" is something you download and install and which *tries to* compensate for (at least a) slowly changing rate of clock drift, and "the native Wintime" is what Windows 7 and other versions use by default for system time? A laptop running out in the field (especially an old one) may have a more variable internal temperature due to loading, internal fan that turns on and off and power saving features than a big PC with continuous big fan running on a desk indoors, but yes I am sure an NTP client is better than the default Windows thingy.  
> **username_0**: Thats great help, I think I will configure one of the laptops as ntp server for the other one as they are on all the time whilst the PC is not. Also might have to shut down and replace the cmos batteries. One laptop is connected via internet over power line and the other by a wifi extender both through the router. Do you think that would make a difference?  
> **username_1**: NTP works best and assumes symmetric network delays but I think that will be OK over power line and the wifi extender - it's more of an issue over ADSL or cable modem connections. If your CMOS battery is possibly dead, you want to make sure `ntpd` is started with the `-g` flag as in this [screenshot](https://1drv.ms/u/s!AsIWxefRvOMTlBThJveIbcDCPnMS?e=JyATqn) so it will startup even if the initial clock step is >1000s  
> **username_2**: @username_0 it's always okay to answer your own question; if you find a solution and/or source of the big time error, please consider stopping by and writing it up as (at least a short) answer post. *Thanks!*  

---

## 0 answers

