A simulation is paused while a robot application waits for an operation to finish. Ten seconds pass on a wall clock, but an application timeout still reports no elapsed time. The arithmetic can be consistent if the timeout uses the paused simulation clock.
The problem is not resolved by adding more decimal places to the timestamp. A duration has meaning within a clock domain. Before interpreting a timeout, the reader needs to know which clock advances it and what that clock is allowed to do.
Separate an event deadline from a clock reading
A simple duration check records a start value, reads the same clock later, and compares their difference with a chosen interval. This describes arithmetic, not a guarantee that the application is scheduled exactly when the interval expires.
For an original hypothetical example, suppose the intended interval is one second. The application starts waiting when its selected clock reads 5.0 seconds. It considers the interval elapsed when that clock reaches 6.0 seconds.
This rule leaves a crucial question open: one second of which time? It could mean progress in the simulated world, elapsed time observed by a local steady clock, or an interval measured against a system wall clock.
A paused clock can produce a correct zero
Invent a simulation whose clock reads 5.0 seconds when it pauses. During the pause, a separate local steady clock advances from 100.0 to 110.0 seconds.
The simulation-clock duration is 5.0 − 5.0 = 0.0 second. The steady-clock duration is 110.0 − 100.0 = 10.0 seconds.
Neither subtraction is internally contradictory. They describe different progress. A check waiting for simulation time 6.0 has not reached its chosen deadline, even though ten steady seconds have passed.
Whether that is appropriate depends on the timeout's purpose. A modeled process may intentionally pause with the simulated world. A development tool checking whether a real peripheral has responded may need an elapsed-time interpretation that continues during that pause.
The example assigns no universal timeout to a robot and supplies no production control setting. It shows why the clock choice belongs with the requirement.
Simulation speed changes the relationship again
Resume the fictional simulation and let it advance by two simulated seconds for every steady second. From simulation time 5.0, reaching 6.0 then takes 0.5 steady second.
A one-second simulation interval and a one-second steady interval now expire at different real observation times. This can be intentional when evaluating a model at accelerated speed.
Conversely, if the model advances at one quarter of the steady rate, the same simulated interval takes four steady seconds. Calling all three cases “a one-second timeout” without the clock domain hides a substantial behavioral difference.
These are stipulated rate relationships, not measured simulator performance. A real simulation can change rate, pause, or experience irregular updates. The chosen clock semantics need to account for that intended behavior.
Wall-clock updates can change a subtraction
Consider another invented trace from one computer. Before a system clock correction, a wall-clock reading is 1,000.00 seconds. After 0.25 second of steady elapsed time, the wall clock has been stepped backward by 0.50 second.
Its new reading is 999.75 seconds. Subtracting the earlier wall value gives −0.25 second, while a local steady clock advancing from 20.00 to 20.25 gives +0.25 second.
A duration algorithm that assumes wall time can never decrease would need to handle this situation. A negative difference does not establish that the physical event ran backward.
Forward steps can create the opposite effect: the chosen timestamp difference can cross a deadline before the corresponding amount of steady time passes. This is distinct from a slow application or a network queue.
What the official references establish
ROS 2's Clock and Time design document distinguishes SystemTime, ROSTime, and SteadyTime. It discusses time abstraction for simulation and playback, including pauses and backward jumps. These are design semantics to examine against the software actually used, not a claim that every timestamp field in a robot system uses one particular clock.
Python's time.monotonic documentation describes a clock that cannot go backward and is unaffected by system-clock updates. Its reference point is undefined, so differences between readings are meaningful rather than the reading being a calendar date.
That property is useful for reasoning about local elapsed intervals. It does not make arbitrary monotonic readings from separate machines directly comparable, nor does it establish the accuracy or scheduling latency of a whole timeout implementation.
The observation point matters too
Imagine the selected steady clock reaches a deadline while the application's task is not running. The application can only act on the deadline when execution returns to its checking code or timer callback.
A suitable clock can make the duration calculation interpretable without guaranteeing immediate execution. Clock semantics and task scheduling are separate parts of the behavior.
Likewise, a sensor's acquisition timestamp and an application's observation of completion can refer to different events. A timeout record should say which event starts the wait and which event ends it. Changing the clock alone does not define those boundaries.
Keep a time-domain trace
For a development record, retain the clock kind, start reading, later reading, requested interval, and observed application action. If simulation time is involved, preserve pauses and rate changes relevant to the interval.
If a timestamp must cross a clock-domain boundary, record the conversion basis and its uncertainty. Simply subtracting values from unrelated domains does not become valid because both are labeled seconds.
A backward jump also differs from an ordinary counter wrap or a new process starting with a different reference. Those events can yield superficially surprising numbers while requiring different explanations.
The useful timeout statement is therefore explicit about the time it measures. A paused-world interval can deliberately pause, while a local steady interval can continue to advance. Naming that choice makes the behavior reviewable without confusing a simulated deadline, a wall-clock correction, and the time at which software actually responds.
Image note: The accompanying site-library robot and computer scene is a concept illustration. It does not show a measured simulator trace, a tested timeout, or a verified real-time deadline.
Sources checked October 23, 2026:
ROS 2 design, Clock and Time, historical design document as accessed:
https://design.ros2.org/articles/clock_and_time.html
Python, time.monotonic, version 3.15.1 documentation as accessed:
https://docs.python.org/3/library/time.html#time.monotonic
All clock values, rate comparisons, and interpretation: original ZHILIANHAI editorial analysis.