AlgoViz

Elapsed time, clocks and causal order

hard 7 min

Wall clocks place events on a civil timeline and may be corrected.

Where it shows up

The same pattern appears across everyday software.

  • A request with a negative duration

    A monitoring release subtracts wall timestamps before and after each request. A clock correction produces a negative value and damages percentile metrics. Record elapsed durations on one host’s monotonic clock and keep separate wall timestamps for correlation. Across services, use trace relationships and explicit uncertainty before inferring which event happened first.

  • Verifying the intervention

    Record elapsed time with a monotonic source. Keep civil time for human investigation. If two hosts contributed the start and end values, a negative duration can be cross-host skew even when neither clock stepped locally.