benilla-re systems structs docs

s_calibrationLimitD

global · core

Address
0x8015d8 · 8 bytes, up to 0x8015df
Type
double
Meaning
Holds 0.008, the 4-to-20-sample agreement threshold
Confidence
verified, proof one
Finding
core/time#calibration-thread

Finding: Calibration thread in core: time

The time manager starts a thread, OsTime, which samples the counter and GetTickCount every 250 ms into a ring of 121 samples and estimates the counter's rate over 1, 4, 20 and 120 samples. It picks the shortest span whose estimate strays from the stored rate beyond its tolerance, capped where neighbouring estimates disagree. In mode 0, a pick of the 20- or 120-sample span, or none, stores the 120-sample estimate and switches to mode 1; a 1- or 4-sample pick stores that estimate and stays. In mode 1 a pick stores its estimate and rescales, and returns to mode 0 when the short-span estimates disagree. The switch is not one-way.

The derivation is in the doc.