What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A timestamp is a machine’s estimate of physical time, not proof that one event caused another. Clocks on different computers can disagree, so sorting their timestamps can put an effect before its cause. Lamport logical clocks address that specific problem: they preserve causal order, but they do not tell you the UTC time or how much time elapsed.
Why can timestamps be wrong in a distributed system?
Each computer keeps a local estimate of physical time. The estimates can differ because of clock skew, drift, delays in synchronization, or clock adjustments. A timestamp from one machine therefore cannot automatically be compared with a timestamp from another as if both came from a perfectly shared clock.
As an Amazon Associate I earn from qualifying purchases.
Imagine process A records an event at 10:00:00.100, sends a message, and process B records the resulting event at 10:00:00.090. If B’s clock lags enough, a wall-clock sort places the consequence first. These times are illustrative, not a measured incident. Google’s Spanner documentation describes the underlying risk: a later transaction handled by a server with a lagging local clock could receive an earlier timestamp, potentially causing a snapshot to omit an earlier completed transaction. Google Cloud’s Spanner documentation
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsWall-clock time remains useful for log displays, deadlines, and human-facing event records. The important distinction is between “the clock says this was earlier” and “this event causally preceded that one.”
#1 Best Overall
What does causal order mean?
In a distributed system, an event happened before another when it could have influenced it: they occurred in that order within one process, or the first event sent a message that the second received. This relation is a partial order. Events connected by such a path are ordered; independent events on separate processes may be concurrent and have no causal order.
A sorting rule can still place every event in a sequence, but that does not mean it has discovered the true order of concurrent events. It may simply be applying a convention.
Rank #2
How do Lamport logical clocks work?
A Lamport clock assigns each process an integer counter. The counter advances as events occur and is adjusted when messages carry information about earlier events. Leslie Lamport’s 1978 paper establishes the key condition: if event A happened before event B, then A’s logical timestamp is less than B’s. Lamport’s paper, “Time, Clocks, and the Ordering of Events in a Distributed System”
Recommended Free Tools
- For a local event: increment the process’s counter before assigning the event its timestamp.
- When sending a message: attach the current counter value to the message.
- When receiving a message stamped
t: set the local counter tomax(local_counter, t), then increment it. Assign the resulting value to the receive event.
This rule ensures that a message’s receive event is timestamped later than its send event, and that local event order is preserved. It does not reconstruct every causal relationship: two concurrent events can receive different counter values, and a smaller Lamport timestamp does not prove that the lower-valued event caused the higher-valued one.
Rank #3
How can a system order concurrent events?
If an algorithm needs a total order—one in which every pair of events can be sorted—it can compare a pair consisting of the Lamport timestamp and a stable process identifier. Compare the timestamp first, then the identifier when timestamps match. This gives a deterministic tie-break and extends the causal order, but it does not make concurrent events causally related or reveal which physically occurred first. Lamport discusses this extension in the 1978 paper linked above.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Physical clocks, Lamport clocks, and TrueTime
| Mechanism | What it represents | Ordering guarantee | Concurrent events | Elapsed time |
|---|---|---|---|---|
| Wall clock | An estimate of physical time | Timestamp order reflects clock readings; disagreement can reverse causal order | May sort them, but the reading alone does not establish causality | Can support duration estimates subject to clock accuracy and adjustment |
| Lamport clock | Logical event order | If A happened before B, then L(A) < L(B) | Can be ordered by timestamp plus process-ID tie-break, by convention | No |
| Spanner TrueTime | An interval representing possible physical times | Spanner documents a guarantee that a timestamp whose generation finishes before another begins is smaller than the latter timestamp | Spanner uses its timestamp guarantees for transactions and external consistency | Represents bounded uncertainty in physical time; it is not a Lamport counter |
Google Cloud describes TrueTime as a distributed clock with an uncertainty interval, used by Spanner to support transaction timestamp guarantees and external consistency. That is a system-specific approach to physical-time uncertainty, not a property of logical clocks generally. Google Cloud: Spanner, TrueTime, and external consistency
Quick Recap
Rank #4
Which kind of time should an application use?
- Use wall-clock timestamps when people need to see approximate event times or a system needs deadlines. Treat cross-machine ordering as uncertain unless the application’s clock assumptions justify it.
- Use Lamport clocks when the requirement is to preserve causal precedence or provide a deterministic order for a distributed algorithm. Do not use them to report UTC or measure durations.
- Use a system with explicit physical-time uncertainty guarantees when transaction semantics require stronger real-time ordering. Spanner’s TrueTime is one documented example; its guarantees depend on that system’s design and assumptions.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




