So You Thought Time Was Simple

Posted on August 3, 2013

Imagine yourself looking at your phone and the display clock is showing 10:55. You know that in three minutes the local bus will arrive at the nearby station leaving you just enough time to catch it. If you miss it you will miss all the connections afterwards and arrive late for a very important meeting. Now imagine how the driver of the same bus sees 10:57 at the top corner of his display at the same moment you looked at your clock and were seeing 10:55. He pushes the gas pedal a bit since last time he was late for more than 2 minutes on the round-trip he got 10 percent salary reduction. I know, you’ll miss that bus. You will just watch it leaving the next station down the road. Then you will look at your phone and you will see 10:57. You are right on time! You better call and excuse yourself at the meeting. If you just knew.

Measuring time - Horology

Time is an artificial concept invented in order to track and communicate, with a certain precision, expected occurrence of an event in the relation to other occurrences of the same or other events. One familiar example is ordering some series of events. Early civilizations figured out that they can trust the stability of periodicity of natural events and that they could take them as a reference system to express the relation of occurrences of events. After the second time you see the full Moon and in the middle of the next day something will happen, or, wait for the Sun to get up to three quarters of the route it passes across the sky in the early spring and then give me a call.

At certain point of history people understood that they need to express themselves on a scale more granular than one year or one day. They needed to express somehow that lot of events can occur very fast one after another. They needed a reference system with a higher resolution. At first people measured how Sun goes over the sky and marked the position of the shadow over the day. You can imagine how confusing this was on a cloudy day. Over the night, maybe you could measure movement of the Moon but it was certainly more difficult. In order to avoid this confusion inventors started creating different mechanisms to simulate stable and predictable repetitive events trying not to depend on astronomical phenomena. Candles that where burning in an uniform rate, sand clocks that were drifting sand uniformly. Over time people got better at creating mechanisms to simulate a reference system with higher resolution and more stable periodicity. Clocks of various mechanisms were invented. Mechanical, water based, pressure based, sand based and more.

Atomic clocks

Jump to the more recent history. With better understanding of the matter and particles that comprise it, scientist have found a source of very stable and inexpensive way to generate periodic events with very high resolution. Between the years 1920 and 1930 scientist explored properties of quartz. Today, most of modern commercial watches use quartz oscillator to create an electrical signal with a very high frequency which allows for very precise and stable time measurement. Quartz crystal oscillator can generate signal of frequency in the scale of 30MHz which means around one “tick” every 33 nanoseconds. Quite good progress considering that we started with the resolution of a year or day. Quite good but not good enough for the ambitious challenges in front of us.

Next step towards higher resolution of the time measurement came with the atomic clocks. Atomic clock is a clock which bases its operation on properties of an atom. Namely, on a hyperfine electron level transitions in hydrogen-1, caesium-133 and rubidium-87. How atomic clocks exactly work goes out of the scope of this text but is fascinating enough that I can encourage you to look a bit for yourself. What is certainly in scope is to understand how more precise measurement of time enables for development in almost any area. First atomic clocks, like first computers, were huge machines. As with computers, scientific progress made them much smaller. Consequence of this is that we are moving towards the possibility to have an atomic clock in every embedded device, but we are not there yet. Currently the smallest atomic clock is the Chip Scale Atomic Clock but still not in the broad commercial use. Until the chip scale atomic clocks spread across commercially available devices we have to keep developing different ways to synchronize the clocks around the world keeping the world pulsing in one beat.

Synchronizing the world

So we have made a huge progress so far in developing a precise, stable reference system with a huge resolution. But still not there yet to have an atomic clock on your wrist or in your phone. In everyday activities we need to rely on the less precise measurement techniques which drift over time. That drift makes our clock being 2 minutes behind the clock of the bus driver from the beginning of the story. It makes us being early or in the worse case late for a meeting, it makes GPS system to calculate your current position with an error, it makes the nuclear missile missing the asteroid heading towards the earth for about an inch. You get it, wrongly calculating the occurrence of an event has its real consequences. In some situations these consequences are mild, sometimes can be very serious.

In order to reduce the consequences of unsynchronized activities there is an other process of development going on. Development of ways to distribute the current precise time across the network of machines. Imagine that you are prevented in a way to use clocks for a longer period of time but still must do your everyday activities as you do them today. You could see how inconvenient it is and how you would get out of sync with the world. NTP (Network Time Protocol) is the protocol that defines an approach for clock synchronization in a packet-switched, variable-latency data network. It is one of the oldest running protocols on the computer networks. Every computer on the Internet that wants to be synchronized with the reference time (so called UTC - Coordinated Universal Time) has to be part of the network built on top of this protocol. We do not notice that very often because for most of us this works without interference with everyday activities. It is a background daemon (usually called ntpd) that is talking to other servers in the time synchronization network and adjusts our local clock according to the information on the network. RFC5905 describes NTPv4 which improves on the previous standard version NTPv3 which runs for years already.

As the number of devices on the network grows rapidly, the number of servers needed to support seamless functioning of time synchronization grows accordingly. NTP Pool is a community maintained server pool comprised of CPU cycles donated by the community members. It is the default network used in Linux distributions. Providers of commercial operating systems maintain their own commercial NTP networks.

With the evolution of the nature of Internet and nature of software reflecting it, highly precise synchronization of time grows in importance. More data means actually more events occurring in the same time period as before. This brings more challenges in recording them, storing them, ordering them, synchronizing them across the network and much more. An example of how important understanding of concepts of time is can be found in the recent research document about Google Spanner (PDF) which is Google’s implementation of global-scale, synchronously-replicated database. Its implementation uses GPS and atomic clocks for global synchronization and consistency of the data.

Final words

OK, so you just wanted to catch the bus but got an overview on the overwhelming complexities of time. Although, when I see it from the perspective of an ordinary person, I think, for the ordinary use case we have solved this problem quite well. Fact that one can heavily rely on the time measurement systems in every day life, their omni-presence and more or less seamless synchronization tells how important it is for us. Could we tell it as a big success of the humanity overall? Could we call it as a confirmation that we could agree on something to bind us so we can function better together? In fact we could find numerous of examples like this if we just scratch a bit under the surface.

Go, explore