Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  "When you have a clock you always know what time it is.  When you have two you are never quite certain." -Mark Twain

I've always wanted one of those watches that sync itself based on the time signals based on WWV; and have a dream that one-day all the clocks/watches in my house will show the same time. But I've resigned myself that it probably won't happen.


Reminds me of a comment in the original Bitcoin source code: "Never go to sea with two chronometers; take one or three."

One of the three was left as a todo :D

https://github.com/trottier/original-bitcoin/blob/92ee8d9a99...


I used to think this quote is annoying and stupid - when you have a single clock, you always trick yourself into thinking that the time is """correct""", but when you have two you'll usually be confident within a margin of error. This is why the International Atomic Time is derived by averaging many atomic clocks, or how NTP gets time from multiple servers.

But on second thought, it can also interpreted as such: in a large synchronous system, it's often important to have a standard reference clock and to lock all the other clocks onto main clock, otherwise the system can be inconsistent due to timing problems, e.g. distributing a frequency reference in a lab, distributing the clock signal on a circuit board, or distributing standard wall clock time via NTP (the Stadium 1/2/3 hierarchy). So the quote makes perfect sense again.


Not quite the same, but I picked up a cheap GPS module with PPS output and an external antenna from AliExpress and hooked it up to a Raspberry Pi 3 running chrony.

Currently it's just set as the time server via DHCP for my computers, but I'm making a nixie clock which will use an ESP8266 running SNTP.


Almost ten years ago I recycled/converted Topfield to show time with an arduino-like board and a network adapter. Basically, it listens to NTP broadcast messages and "keeps" time in between.

Its timekeeping will suck though if it won't receive the messages periodically, but in practice it's quite fine. Except once when the ethernet board somehow broke down; fixed it by replacing it.

Here's a short writeup I did for hackaday: https://www.modeemi.fi/~flux/projects/TopfieldClock/


Yeah, that's on my bucket list too. I love the looks of Nixie clocks, but I think I've read that they generate a lot of heat. Is that accurate?


Nixie tubes are cold-cathode discharge tubes.

I've got some IN-14's, they can't handle more than 2.5mA. Operating voltage is ~150V, so that's at most 0.38W per tube.

So no, they won't get hot.

This is unlike vacuum tubes, used for amplifiers and similar, which are hot-cathode and needs a heating filament. They can get quite hot indeed.


No it is not. You can touch them, no problem.


Out of curiosity, have you analyzed how different/better your setup is compared to just using something like time.google.com?


I admit it was more for the geek factor than anything else, and I'm no expert in the field. Here are the source stats[1] from chrony:

Pi with GPS

    $ chronyc sourcestats
    210 Number of sources = 7
    Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
    ==============================================================================
    PPS1                        8   6   112     -0.018      0.020   -105ns   336ns
    GPS1                        7   6    95    +55.685    111.018   +126ms  1058us
    GPS2                        8   6   112     -0.018      0.021    -89ns   341ns
    2a01:79a:408::250          18  10  310m     -0.057      0.080  -1364us   522us
    time.cloudflare.com        19  13  344m     -0.068      0.038  -1274us   258us
    ntp.coreless.net            6   3   85m     -0.343      0.706  -2355us   354us
    anduin.net                 21   8  379m     -0.020      0.051   -835us   388us
Debian VM running on Bhyve(FreeBSD) in same LAN

    $ chronyc sourcestats
    210 Number of sources = 5
    Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
    ==============================================================================
    timepi.localdomain         13   7   64m     +0.001      0.031   +328ns    28us
    79.161.39.253.static.lys>   8   6  120m     -0.002      0.184  -2122us   189us
    125.51-174-177.customer.>  22  13  464m     +0.287      0.117   -839us  1201us
    time.cloudflare.com         6   5   85m     +0.009      0.472  -1615us   277us
    c1EE4653E.static.as2116.>  10   7  155m     -0.146      0.603  -3315us  1256us
So on the VM it seems to "just" be an order of magnitude better. But that should be worst-case.

[1]: https://chrony.tuxfamily.org/doc/3.3/chronyc.html


Nice!


My favorite WWVB watch was the Casio WV-300 series, released around 2007. It's notable for being less than 8mm thick: https://www.google.com/search?q=casio+wv-300&tbm=isch

The GMW-B5000 series is a reasonable successor, but it's thicker, heavier, and 4X the price: https://www.google.com/search?q=casio+gmw-b5000&tbm=isch


Sadly, it won't happen because WWV connectivity has been superseded by NTP, Bluetooth syncing, and GPS-based smartwatches. It almost stopped being a possibility when Trump tried to defund some of the NIST, but fortunately that did not come to pass.

My Garmin watch syncs to GPS satellites every time I start an activity. My cell phone (which many of my friends and family use as a replacement for a watch) syncs to the cell towers. Even appliances now are operated by microcontrollers with crystal oscillators having a frequency tolerance on the order of 20ppm: their clocks have little drift. Mine are not 'smart appliances', but those are becoming pervasive, and they, too, sync via NTP.

Ultimately, though, all those NTP and GPS clocks have their master at the NIST in Boulder, Colorado - the same clock that WWV, broadcasting from Fort Collins, 50 miles north, synchronizes against.


Mark Twain has a quote for everything!

  An ancient adage warns, "Never go to sea with two chronometers; take one or three." — Fred Brooks


And for NTP, take 5 because two could tell the same lie ;)


And how do you use them--only use the median value?


2 vs 2 you don't know who to trust, but if you have 3 vs 2 you know who you ~can trust (more), that's why 5 and not 4.

But if you have a atomic clock don't trust those 5 ntp's at all. Maybe buy a 2nd clock or even better 5 of them ;)


I would assume that all 5 give slightly differing estimates of the current time [a, b, c, d, e] with duplicates being rare and not treated specially than values that are close. You can either choose 'c' to ignore the outliers, or average [b, c, d] or some weighted average of them or more. Maybe the weighted average of the middle 3 might be more stable than the single median.



> The best master clock (BMC) algorithm performs a distributed selection of the best candidate clock based on the following clock properties: (IEEE 1588-2008 uses a hierarchical selection algorithm based on the following properties, in the indicated order:[8]:Figure 27)

> Priority 1 – the user can assign a specific static-designed priority to each clock, preemptively defining a priority among them. Smaller numeric values indicate higher priority.

> Class – each clock is a member of a given class, each class getting its own priority. Accuracy – precision between clock and UTC, in nanoseconds (ns)

> Variance – variability of the clock

> Priority 2 – final-defined priority, defining backup order in case the other criteria were not sufficient. Smaller numeric values indicate higher priority.

> Unique identifier – MAC address-based selection is used as a tiebreaker when all other properties are equal.

Only useful if you trust the data: Class, Accuracy, and Variance (which seems to be a self-measured estimate).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: