Agreeing On Time
We'll cover the following...
Introduction
When working on a single machine, there’s a single source of truth for time, which is the machine’s internal clock. This clock is often a quartz crystal oscillator.
If the machine’s clock is faster or slower than the actual time, measuring duration of time on a single machine will still be correct since it involves computing the difference between two points in time (assuming the clock is never reset). However, determining a particular instant on the timeline, e.g. a timestamp, may or may not be correct if the machine’s internal clock is not synchronized with the actual time. Though if all the events occurring on the machine are time stamped without the clock being reset, an ordering among the events can still be established.
In practice, a machine’s internal clock is periodically synchronized to an external source of actual time. The NTP (Network Time Protocol) synchronizes to an extent, a machine’s internal clock to the time reported by a group of servers, which in turn synchronize their times to a more ...