4 ms·
What's amazing is that if your computer is not set to automatically sync its time, you can see how fast it's drifting. My main desktop is 1.7 seconds ahead at
by TacticalCoder 3y ago
What's amazing is that if your computer is not set to automatically sync its time, you can see how fast it's drifting.
My main desktop is 1.7 seconds ahead at the moment. Probably haven't updated the clock in a few weeks: which isn't that much. Other systems shall drift much more.
As to "why" it's not setting the time using NTP automatically: maybe I like to see how quickly it drifts, maybe I want as little services running as possible, maybe I've got an ethernet switch right in front of me which better not blink too much, maybe I like to be reminded of what "breaks" once the clocks drifts too much, maybe I want to actually reflect at the marvel of atomic drift when I "manually" update it, etc. Basically the "why" is answered by: "because I want it that way".
Anyway: many computer's internal clock/crystal/whatever-thinggamagic are not precise at all.
- harikb 3y agoFrom wikipedia > Typical crystal RTC accuracy specifications are from ±100 to ±20 parts per million (8.6 to 1.7 seconds per day), but temperature-compensated RTC ICs are available accurate to less than 5 parts per million.[12][13] In practical terms, this is good enough to perform celestial navigation, the classic task of a chronometer. In 2011, chip-scale atomic clocks became available. Although vastly more expensive and power-hungry (120 mW vs. <1 μW), they keep time within 50 parts per trillion.
- peteey 3y agoCrystal errors tend to be around 20 ppm (parts per million) After a week, 20 ppm would drift 12 * 10^-6 * 7 * 24 * 60 *60 = 12 seconds. Your motherboard probably has a cr2032 keeping it powered when unplugged. Crystals: https://www.digikey.com/en/products/filter/crystals/171?s=N4IgjCBcoExgrABiqAxlAZgQwDYGcBTAGhAHsoBtEAZhgDoB2ANgA4ACAawAkAvEAXRIAHAC5QQAVQB2ASxEB5DAFkCWPAFcATgRABffUA https://www.digikey.com/en/products/filter/crystals/171?s=N4...
- crote 3y agoIt kinda makes you wonder why desktop computers don't use the AC frequency as a stable-ish time source. Short-term accuracy is pretty poor, but it can definitely do better than 12 seconds over a week!
- moffkalast 3y agoI suppose it's because no AC ever gets to the motherboard in your typical ATX setup? It's all just DC 12/5/3 volts and could be coming from a battery for all it knows. There would need to be an optional standard way of getting time from the PSU and have the AC time keeping there.
- crote 3y agoOf course, but there's no reason why a 50/60Hz signal couldn't have been included in the ATX power connector back when it was established a few decades ago. In an alternate universe it would've been put in there, together with all the weird -12V / -5V rails nobody uses these days. Getting it these days would indeed be pretty much impossible.
- labcomputer 3y agoSure, but it costs extra and nobody (to a first approximation) cares. So why bother?
- brohee 3y agoThat's a very optimistic assumption, the target is 50Hz but if it is below or over for a long period of time (e.g. high load in winter making it hard to sustain the nominal frequency) there are no provision to make it run faster or slower unless the time drifted by more than 30s (that's possibly only valid for Europe). More at https://wwwhome.ewi.utwente.nl/~ptdeboer/misc/mains.html https://wwwhome.ewi.utwente.nl/~ptdeboer/misc/mains.html
- calfuris 3y agoThe standards are tighter in the US, with corrections being triggered by 10/3/2s differences and stopping at 6/0.5/0.5s (Eastern/Texas/Western interconnections). Src: https://www.naesb.org/pdf2/weq_bklet_011505_tec_mc.pdf https://www.naesb.org/pdf2/weq_bklet_011505_tec_mc.pdf
- fanf2 3y agoThere’s a fun thing about quartz wristwatches: one of the biggest contributions to frequency fluctuations in a quartz oscillator is temperature. But if it is strapped to your wrist, it is coupled to your body’s temperature homeostasis. So a quartz watch can easily be more accurate than a quartz clock! Really good watches allow you to adjust their rate, so if it runs slightly fast or slow at your wrist temperature, you can correct it. One of the key insights of John Harrison, who won the Longitude prize, was that it doesn’t matter so much if a clock runs slightly fast or slightly slow, so long as it ticks at a very steady rate. Then you can characterise its frequency offset, and use that as a correction factor to get the correct GMT after weeks at sea.
- lxgr 3y agoThat would require tuning it to the average body temperature though, right? Or are you saying that what makes quartz crystals drift is the change in temperature?
- fanf2 3y agoBoth are true :-)
- lxgr 3y agoOh, I missed your comment about being able to tune some wristwatches quartz! I wasn't aware that was a thing. Still, wouldn't the temperature of a watch while being worn vary as least as much as when sitting in a drawer (unless you live in a region blessed with t-shirt weather year around)? One of my favorite wristwatches I used to wear as a teenager had a thermometer, but I don't remember how exactly that varied over the year, just that it always showed neither quite my body temperature, nor quite the ambient one :)
- labcomputer 3y agoThe crystals used in watches are usually cut and selected so that a local minimum or local maximum of the tempco is near the temperature of your wrist. Thus, the tempco is near zero, so human-to-human differences don’t matter much. One thing to notice is that quartz watches almost always have a metal backplate touching your wrist so that the crystal can have good thermal contact. Presumably, the thermometer in your watch was decoupled from that plate.
- throw0101a 3y ago> After a week, 20 ppm would drift 12 * 10^-6 * 7 * 24 * 60 *60 = 12 seconds. Where are you getting that 12 from?
- dmoy 3y agoIt should read 20*, not 12. The end result is 12 seconds.
- ReactiveJelly 3y agoCan't say too much but I saw an IoT product where, if NTP failed, they would all slowly fall behind. I really appreciated this because fixing NTP would jump forward, leaving a gap in perceived time instead of living the same moment twice. So I assumed that, like how speedometers purposely read a little high, the crystals must purposely read a little slow so that computers don't slip into the future.
- lxgr 3y agoThat's a neat way of ensuring that time never jumps backwards on your system! Reminds me of the same idea but applied in the opposite way in some train station clocks: Their second hands take slightly less than a minute to complete one rotation, after which they stop and wait for a signal sent from a central clock to be released simultaneously. Making a clock run slightly slow or fast is much easier than making it run just about correctly :)
- robotguy 3y agoI worked on an embedded video system once where no one took into account the slight difference between the encoder and decoder clock frequencies. If the encoder was slower, no problem, you dropped a frame every once in a while. If the encoder was faster, you would buffer frames up to the memory limit of the system. Since these systems were typically left on for weeks at a time, the pilots would eventually discover the video they were using to fly a vehicle was several seconds in the past. Luckily this was discovered before initial shipment and the code was changed to drop everything in the buffer except the latest video frame.
- koito17 3y agoWhen setting up a mini PC as a home server about 40 days ago, I did not realize Fedora Server does not configure NTP synchronization by default. In only two weeks I managed to accumulate 30 seconds worth of drift. Prometheus was complaining about it but I had erroneously guessed that the drift alert was due to having everything on a single node. Then when querying metrics and seeing the drift cause errors, I compared the output of date +'%s' on the server and my own laptop. The difference was well over 30 seconds.