The Timing and Buffer Ledger

The Timing and Buffer Ledger

Ada audits the timing and buffer ledger — clock drift, sample offset, buffer fill, and outage backlog

foundations
math-foundations
edge-acquisition
timing
intermediate
Ada ADA · CALCULATION AUDIT

Foundations · optional mathematics and physics

The Timing and Buffer Ledger

The chapter treats timing and buffering as a conservation check: a 50 ppm oscillator drifts about 180 ms in an hour, which is 18 samples of error on a 100 Hz stream, and a 64 KB buffer holds only about 13 seconds of a 4.8 KB/s stream. Every rate must convert to seconds, samples, or bytes before the contract is trusted. This audit works the timing and buffer ledger line by line.

Companion to the chapter Acquisition Timing and Buffer Contracts — every number here comes from that chapter.

Clock drift, sample offset, buffer fill, and outage backlog, ~4 minutes

Ada: Treat timing and buffering as a conservation check. Convert every rate into seconds, samples, bytes, or records before trusting the acquisition contract.

See the relationship before changing it

The figure reads from left to right. The blue card is free-running interval. The middle card applies this page's rule. The green card is clock drift at 50 ppm. Walk the arrows once: set the input, apply the rule, then read the result with its unit.

The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only free-running interval, so the numeric fixture does not switch without explanation.

Free-running interval changes clock drift at 50 ppm An input card leads through the rule drift = interval x 50 / 1,000,000 x 1,000 to the clock drift at 50 ppm result. INPUT PAGE INPUT APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrows. Clock error accumulates with free-running time and becomes a sample-alignment error.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 3600 s.

  2. 2

    Name the relationship. drift = interval x 50 / 1,000,000 x 1,000

  3. 3

    Substitute with units. 3,600 x 50 / 1,000,000 x 1,000 = 180 ms

  4. 4

    Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.

Predict, then change free-running interval

Try Predict the direction of drift = interval x 50 / 1,000,000 x 1,000. Test another free-running interval, then compare clock drift at 50 ppm.

3600 s
Chapter baseline
Clock drift at 50 ppm

Observe Clock error accumulates with free-running time and becomes a sample-alignment error. Reset free-running interval to 3600 and compare clock drift at 50 ppm.

Explain Clock error accumulates with free-running time and becomes a sample-alignment error.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only free-running interval moves here. Field effects named in the technical boundary stay fixed.
TryBefore selecting Check derivation, predict how far a 50 ppm clock moves in one hour and how long 64 KB retains a 4.8 KB/s stream.
ObserveThe timing side reaches about 180 ms, or 18 sample periods at 100 Hz. The independent storage calculation leaves only 13.3 seconds before the buffer must overwrite or drain data.
ExplainClock skew is elapsed time multiplied by fractional frequency error; retention is available bytes divided by production rate. Converting both contracts into base units exposes whether synchronisation and buffering can preserve the evidence window.

The ledger

Clock drift = 3600 s x 50 / 1,000,000 = 0.18 s = 180 ms in one hour
100 Hz sampling period = 1 / 100 s = 0.01 s = 10 ms
Sample offset = 180 ms / 10 ms = 18 samples, so the vibration streams no longer align
Data rate = 100 records/s x 48 bytes/record = 4800 bytes/s = 4.8 KB/s
64 KB buffer time = 64,000 bytes / 4800 bytes/s = 13.333 s, which supports the chapter's about 13 seconds claim
Two-minute outage backlog = 120 s x 4800 bytes/s = 576,000 bytes = 576 KB
1,000-record ring buffer at 100 records/s holds 1,000 / 100 = 10 s of raw records; keeping the newest 1 s reserves 100 raw records and forces an explicit policy for older evidence
Technical boundaries
The timing ledger deliberately does not simulate oscillator wander, resynchronisation, scheduler jitter, bursty records, framing overhead, storage latency, or concurrent replay; it assumes constant 50 ppm drift and a constant 4,800-byte-per-second producer.

Work the audit first, then check the displayed derivation.

Every number above is taken from the chapter's own timing and buffer example and re-derived step by step.