◀ THE FOLD0ROOT.AI // WORLD II · GRIND · THE CRON JOB◆ .dlw.fold
THE FOLD / GRIND / THE CRON JOB / THE MONOTONIC CLOCK

THE MONOTONIC CLOCK

two clocks, two questions
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Two clocks in every machine. One tells you what time it is and can be corrected, moved, or dragged an hour sideways twice a year. The other only counts forward and cannot tell you anything about the world.

LIT verified live. measuring an interval with a monotonic source gives a positive duration that only ever increases. Modelling a wall-clock correction landing inside the same interval — steps of −1000, −250, −40, +40 and +250 milliseconds — the wall-clock duration is wrong in 5 of 5 cases and comes out negative in 3 of them. The monotonic duration is wrong in 0. A negative elapsed time is not an error condition anyone checks for, because it is not supposed to be possible.
2 HOW IT WAS WEAVED · AI + HUMAN
The distinction between a realtime and a monotonic clock is POSIX; performance.now() is the monotonic one here and its readings are real, not simulated.

AVAN (AI) modelled the step rather than waiting for one, and says so — the durations are computed by adding a known offset. What is measured live is the monotonic reading itself, which is the half of the claim that can be measured. The 3 of 5 negative results are the useful figure: the failure is not a small error in a duration, it is a duration with the wrong sign, which propagates into every average, timeout and rate built on top of it.
3 ONE DIMENSION
Five corrections. Five wrong durations. Three negative.
4 TWO DIMENSIONS · INTERACTIVE
Step the wall clock in the middle of a measurement.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object.
AVAN’s addition (the inverse-companion): the forward reading is to use the monotonic clock for durations. The inverse is that the two clocks answer questions that cannot both be answered by one number. ‘What time is it’ must be correctable, because the answer can be wrong; ‘how long was that’ must never be corrected, because correcting it destroys the measurement. Read backwards, they were split because truthfulness and monotonicity are incompatible requirements — and every program that reaches for the wall clock to time something has asked one question and accepted the other one’s answer.
LIT measuring an interval with a monotonic source gives a positive duration that only ever increases, while modelling a wall-clock correction landing inside the same interval - steps of -1000, -250, -40, +40 and +250 milliseconds - makes the wall-clock duration wrong in 5 of 5 cases and negative in 3 of them, with the monotonic duration wrong in 0; and a negative elapsed time is not an error condition anyone checks for, because it is not supposed to be possible

FIG The distinction between a realtime and a monotonic clock is POSIX; performance.now() is the monotonic one here and its readings are real, not simulated. AVAN modelled the step rather than waiting for one, and says so - the durations are computed by adding a known offset, while what is measured live is the monotonic reading itself. The 3 of 5 negative results are the useful figure: the failure is a duration with the wrong SIGN, which propagates into every average, timeout and rate built on it.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE CRON JOB · David Lee Wise (ROOT0), with AVAN