We have a thing about accurate time. We're the ones who set our quartz watches by calling the U.S. Naval Observatory at +1 (202) 762-1401, listened to WWV on the Shortwave and we're the ones who noticed New Year's on TV was several seconds after our own clocks hit midnight.
Now we measure time to the millionths, if not billionths, of a second. Here you can compare performance data of our five Network Time Protocol time servers and check on some NTP clocks and Swiss watches in our collection.
A Stratum 1 NTP Time Server Using NTPSec (GPS, Galileo, GLONASS)
NTP1 used to be our external NTP server and supports outbound NTPSec NTP queries. Unfortunately, it turns out that even on a business account, Spectrum blocks inbound NTP queries as they consider them to be a potential denial of service vector. Annoying.
This is our only NTP server with external NTP sources, which are remnants of our NTPSec testing.
Generally, over twenty-four hours we expect 99% of the readings from this server to be within one microsecond (one millionth of a second).
A Stratum 1 NTP Time Server Using Chrony (GPS, Galileo, BeiDou)
NTP2 is almost identical to NTP, aside from servicing NTP using Chrony. It is only available internally, Chrony data is converted via script so it can be compared to our other servers. Details can be found in any of the hourly reports.
Look closely at Chrony's jitter at the top of every hour. There is the Chrony logfile copy job that none of our other servers have and this job creates enough of a load to cause jitter. I have already moved file processing to a different machine, but just copying the file caused the jitter.
Generally, over twenty-four hours we expect 99% of the readings from this server to be within one microsecond (one millionth of a second).
A Portable Stratum 1 NTP Time Server Using NTPSec (GPS, GLONASS)
NTP3 is a portable PPS enabled time server. It is mobile and can be connected to the network via ethernet or wi-fi. We've added it so test a lower power RPi in a sub-optimal network configuration. For best portability, this Raspberry Pi can be powered by AC power by adapter, or by Power over Ethernet. Although you can see this generic patch GNSS antenna is artfully bound to the RPi with rubber bands, there's about ten feet of cable that can be unwound for better positiioning.
Because of being on WiFi, using an RPi 3, having a real-time clock and keeping the antenna indoors, this server's accuracy is substantially diminished.
We're also using an older version of the Uputronics GPS HAT here that does not include a real-time clock, which does make for additional substantial variance each time this is rebooted.
Spectracom SecureSync 1200 Rubidium Disciplined Oscilator (GPS, Galileo, GLONASS)
TP4 is probably why you made it to this page. Here is our atomic clock, an Orolia/Spectracom SecureSync 1200 rubidium disciplined oscilator NTP Server. This appliance can keep within 1 microsecond (one millionth of a second) per twenty-four hour period without a GNSS signal, but that's not exactly why we got it. We're interested to see what happens with a time source with an extremely low frequency jitter when the GNSS source is removed. Generally, when there is a GNSS signal, we expect this server to be within a few billionths of a second of "true" time. And sometimes it reports it's with in one nanosecond of "true" time.
For comparison, without a GNSS signal, our RPi NTP servers can expect to drift 450 microseconds (almost a thousandths of a second) per day.
A Stratum 2 NTP Time Server Using NTPSec (Not GNSS Disciplined)
Reporting has other tasks and is the only time server that's not disciplined by GNSS, meaning it keeps its accuracy only through NTP connections to our other servers.
Generally, over twenty-four hours we expect 99% of the readings from this server to be within twenty microseconds (twenty millionths of a second). But if it were to lose NTP connection, it could easily be off by as much as four minutes in a month.
The LeoNTP Stratum 1 time server is truly an appliance. There is no configuration at all aside from setting a static IP address if you need one. Unlike the other servers, it doesn't even need to connect to another NTP server as part of its sanity check. It doesn't offer reporting, so all we can show you is what the other servers see from their time services.
I thought about writing my own How-To Make a Stratum 1 Raspberry Pi NTP Server instructions, but I quickly realized there are already plenty of good ones.
LeapSecond.com is an incredible collection of time and frequency measuring equipment along with experiments that prove for the first time, outside a multi-million dollar laboratory, that Einstein's Theory of Relativity is valid.
This lovely presentation by Tom Van Baak illustrates increasing clock / frequency accuracy in Clock Powers of Ten from dripping water through to the most accurate cesium clock.. Spoiler: By a large factor, Earth is less accurate than the time we're able to measure. And maybe we'll eliminate leap seconds because of it -- all brought on by the possibility of a negative leap second, an IT issue not contemplated by most.
The National Institute of Standards & Technology maintains the United States Master Clocks. Are you a time geek? Learn about an in development strontium clock that would not have gained or lost a second since the beginning of the universe! Your tax dollars at work.
There are lots of ways to describe a microsecond: it's a millionth of a second or 0.000,001 or 10-6 or 1e-6 -- but what does that really mean?
This TED Talk by Kim Preshoff may help.
Also, visit Clock accuracy in ppm for an interesting technical discussion of various oscillators' accuracy over time. (Cesium clocks lose one second over 32,384,400 years!)
Gary Explains makes it easy to visualize these small numbers in relation to the speed of light. Grace Hopper's appearance on David Letterman is thrown in for good measure. If you like this video, you might as well watch the sequel: How Computers Synchronize Their Clocks - NTP and PTP Explained
The Inevitable FAQ
Instead of writing my own How-To Make a Stratum 1 Raspberry Pi NTP Server instructions, you get a FAQ instead.
We have almost a hundred things in the house that want to be connected to the internet and I think it best to limit internet access to those devices that need it and only to the resources it needs to have access to (or none at all, as I've done with our TVs that wanted to share viewing data with the manufacturer). As it turns out, many inexpensive devices don't have their own real-time-clocks, and get their time from the internet each time they boot (usually using NTP or Simple NTP). If they can't reach a time server, their time will drift -- perhaps as much as a minute a day.
The solution to the problem is to have a time server on-site. Let it be the only device in your house that can access public NTP time services (UDP port 123) and force all other devices to use this server. If you already have a DNS server like Pi-Hole, you can add NTP to that server at no cost. This will give you time accurate to within 2/10s of a second or so.
The more challenging issue is to force all of the devices to use the internal time server. If your firewall's port forwarding rules support it, allow your time server access to UDP 123 and force all other devices to your time server. You may already have a similar rule for DNS.
Companies should also have their own time servers on on-site servers are all synchonrized to the same time source.
If I needed a simple set-and-forget time server, I'd consider getting a LeoNTP 1200 appliance. It's about $500 and can manage large NTP loads without any command line configuration or ongoing tinkering. It doesn't even need internet access.
For a home lab, it's easy enough and can be done for under $100. All you need is a Raspberry Pi (ideally Model 4B or newer); GNSS HAT (I prefer the Uputronics HAT, but Adafruit sell one as well) and an inexpensive GNSS antenna. For best accuracy, this Raspberry Pi should not be running any other services (like DNS server and visual desktop). There are several installation demos that I like:
- Although he uses the Adafruit GNSS HAT, Austin's Nerdy Things does a good walkthrough using Chrony. A commenter notes the changes needed to use the Uputronics HAT, which IMO is much easier, and worth a few extra dollars.
- The NTPSec team have a Stratum-1-Microserver HOWTO that's very detailed, though a little dated (you will need Python 2 to run their clockmaker script). You should read it, as it gives lots of insight into how the programs work.
- I'd also look at the early (around 2016) days of Raspberry Pi time servers: The Raspberry Pi as a Stratum-1 NTP Server. I wouldn't follow these instructions as much has changed since then, but you'll get a good feel for some of the technical issues that got us where we are today.
After you get your time server up and running, make sure to read the Performance Tuning section of the GPSD Time Service HOWTO for tips on getting the best performance.
I don't know that it matters between Chrony and NTPSec. Chrony is newer, has a more rapid release schedule and there are lots more recent tutorials using Chrony. On a Raspberry Pi, it's almost as simple as apt install gpsd chrony and configuring. Almost.
On the other hand, NTPSec has been around longer, appears to be more focused on security and shares team members with GPSD. If you look at our NTP server data, it looks like the NTPSec servers have better accuracy and jitter, but this could be because Crony raw data is converted to a format NTPViz can use.
I have three NTPSec and one Chrony servers. The SecureSync uses NTP (the mother of all NTP server software) but I wouldn't choose NTP for my own builds.
I think Network Time Security will eventually become a thing. Both Chrony & NTPSec support it and I think it's worth being prepared for it, especially if your business depends on accurate time.
Precision Time Protocol might also become a thing at the consumer level. The SecureSync supports it with an add-on board. Maybe in the next year or two the hardware & software will align to allow PTP on a RPi.
- If you're interested in powering your Raspberry Pi time server using Power over Ethernet, we'd suggest getting something that already has GPIO pins on top, so you can plug the GNSS HAT directly into the PoE without having to use extender headers. Something like the Waveshare PoE HAT (B) will make your final device much less bulky.
- Your time jitter will be much lower if the u-blox chip can be put into Fixed (Stationary) Mode and knows the antenna is not moving at all, removing position errors as a souce of time error. This can be done with the ubxtool, which is part of most gpsd distributions. I believe jitter can be further improved by performing a survey that fixes the antenna's location to (ideally) less than a meter. Unfortunately, this is only possible on u-blox Timing chips -- only our SecureSync has it.
- Don't connect your time server to your network via Wi-Fi. Ideally connect directly to your main switch. Wi-Fi introduces a lot of jitter that reduces reliability. Check out our NTP3 server for current stats.
- Temperature has a big impact on stability. As the temperature changes, the computer's on-board crystal actually changes how fast it oscillates. Expensive time servers manage this by having little ovens that keep the crystal at a constant temperature. Maybe overkill, but you can help by keeping your computer in stable temperatures, away from drafts and sun. Some people put the computers in insulated boxes to try to limit temperature changes. You can see temperature impact on all of our servers, even the atomic clock. In fact, at certaiin points, you can see where the oven (OCXO) inside the SecureSync is able to fix temperature precisely for a period, but our house is not a lab and outside temperatures and HVAC impact our frequency stability.
- Getting your devices to connect to your fancy new time server isn't straightforward. DHCP can advise its clients that NTP is available at a certain address, but only higher-end systems support this and many clients ignore it. This means logging in to each device and manually setting the time server IP address is the way to go. Even then, some don't let you change the setting. Maybe half of our devices can be connected to our NTP servers -- and worse, if we block port 123, the devices will just do without time synchronization completely and will drift into unusable times. See my comment about port forwarding in the FAQ above.
This is easy enough to answer. GPS is the United States' Global Positioning System and GNSS represents all global navigation satellite system constellations (European Union's Galileo, Russia's GLONASS & China's BeiDou in addition to GPS). My installations use GPS and Galileo, sometimes augmented by GLONASS or BeiDou.
My interest is in getting the most accurate time possible (currently in the millionths of a second) closest to the "real" time reported by master clocks around the world. Accuracy is how close my time servers are to that goal. But even then, the most accurate clocks in the world don't agree on "real" time and those clocks can differ by ~20 nanoseconds. Even the United States' two major clock references -- UTC(NIST) and UTC(USNO) -- can be off by +/- 5 nanoseconds. So, in reality, since our accuracy comes from GNSS Time Transfer, we're looking to be as close to UTC(USNO) as possible -- and with our equipment's limitations, despite what's reported, it's likely not better than 50 nanoseconds.
Precision, on the other hand, may have extremely fine-grained results that are actually not all that close to "real" time. In some cases, I think that is what my consumer-grade systems are reporting.
While stability is keeping that accurate time as close to "real" time as possible without a lot of jitter. This is the key attribute our rubidium server contributes.
Ideally, I seek time that is accurate to what GPS time transfer offers, which is better than ≤30 nanoseconds (billionths of a second), 95% of the time -- all simply for my amusement.
This is an older PV Electronics nixie clock that has a PS2 GNSS input for timekeeping. I struggled for years between putting the clock where I wanted and keeping the GNSS antenna with a clear sky view. Finally, I found the Azevedo Devices nwts NTP client. It's brilliant! It's powered by the clock itself and connects to our time servers by Wi-Fi to keep the clock on time. It even automatically corrects for Daylight Savings Time. All I had to do was solder it together and figure out the pinouts from the 3.5mm jack current clocks use.
I guess a lot of people can't get this La Crosse Technology Wi-Fi Projection Weather Station and Clock to work, as there are lots of returns on Amazon, but I think it's really good. It connects to our time servers by Wi-Fi, it clearly projects the current time on the ceiling and it's able to dim itself at night. (You'll need to go to their website to figure all of this out.) And it gives the weather too -- more than I need, but the best I've found. It replaced a projection clock that would get time signals from WWVB.
Our vintage 2016 Spectracom SecureSync is a real atomic clock -- although it gets its time from GNSS like all of our other time servers, this uses rubidium's properties to discipline the clock and make it much more stable than the crystal oscillators on our other servers. In fact, this uses the same u-blox M8T GNSS receiver as our RaspbRerry Pis. When not connected to GNSS, this server can maintain accuracy to within one microsecond per day, Perhaps 32,000 years to be off by one full second!
The LeoNTP Time Server 1200 is unique in that it doesn't require an internet connection to work. All of our other time servers need to connect to other time servers to get the time -- even if it's connected to a GNSS. This is as simple as NTP gets. Plug it into the network and point clients to it. You'll never have to think about it again.
When this Hewlett-Packard HP 59309A was new, some fiftty years ago, it was able to keep time to within one minute a month. Now, with help from our atomic clock, it receives a signal that helps it keep time as accurate as our newest clocks. Also in this rack, I have the K10 5992A Standby Power Supply, 59303A Digital to Analog Converter and K34 59991A Phase Comparitor.
Many sellers offer variations of this NTP clock with power-over-ethernet. It's designed for schools / hospitals & factories and comes with its own proprietary software that can configure many of these in your facility all at once. If you don't need that functionality, it seems expenive to me and I could have built something fancier for less.
Here are some watches I've collected that set time either by radio or Bluetooth. I got most of these in Japan and have the manuals I can't read to prove it.
In 2010, Seiko brought us the Radiowave Control Solar SDGA003 watch that looked like a Casio G-Shock knock-off, but was packed with technology. It had a super-legible e-ink display, titanium body and like the other radio watches, could use WWVB to sync time. Although screen refresh was slow, there were several faces and it is a fun watch to wear and gets comments even now.
This Citizen W760 (circa 2012) was innovative for the time. It used a Bluetooth LE connection to your iPhone (series 4s only) to maintain time, run the perpetual calendar and notify you when the phone rang. Without being connected to the phone, accuracy was expected at 15 seconds a month. Of course back then, even the phone's time wasn't all that accurate, so maybe what's the point?
This limited edition of 2500 radio controlled Citizen GN-4W-S-12G has an easy-to-set second time-zone function. I thought it looked sharp with the gold-tone stainless steel and crocodile band.
The most striking thing about this Casio WaveCeptor is the price, which was well under $100. It tried six times a day to set itself to WWVB in Fort Collins, CO, or its equivalent radio stations in Japan and England. Unfortunately, its battery needs to be replaced, so I don't know if it still works.
But don't worry -- Casio fixed the price problem with an entry from their high-end Oceanus line.
The Oceanus OCW-M700 took the Casio WaveCeptor concept and added solar charging, a titanium body and sapphire crystal and sold it for 10x the price of the Casio. The used market has taken care of that and this Oceanus can now be had on eBay for the price of the Casio.
On top of all its downsides, it never got a good radio signal.
These days, it seems like I only wear an Apple Watch, but I have a soft spot for Swiss watches.
I've had this watch for more than twenty years and it's always my go-to. It is an extremely practical design, allowing a standard time in the UTC window and easily moving the hour hand backwards or forwards to new time zones. And it's automatic, so yo don't have to remember to wind it. It's been in for service twice and I've always missed it while it's been away. We went to visit the IWC museum and this model was featured at least three times!
I thought I wanted a Reverso, but this does just fine. Another automatic watch I've enjoyed over the years. I felt it was too formal for everyday use, but enoyed flipping it over and watching the movement.
Note that I have a thing for dual timezone watches? The second timezone was easy to set by selecting the city in the bottom window -- and viewable in the small clock face on the southern park of the dial.
Aside from watches and time, I do have some other interests.
Not happy with local weather forecasts, I decided to leverage my desire to put excessive accuracy into things that aren't all that accurate or predictable and learned more about how to forecast for my own microclimate. The results have been variable, but the weather station's current conditions, at least, are highly accurate.