Skip to content

NSP clock conversion is wrong by ~170-280 ms under CENTRAL (no fallback, dishonest uncertainty) #198

Description

@cboulay

Summary

Clock synchronisation is dramatically worse when reading through Central than when CereLink owns the device. The device-to-host conversion exceeds the harness's 100 ms tolerance by nearly 3x.

Evidence

Same hardware, same session code, soak harness --intense:

Metric CENTRAL CLIENT STANDALONE (--native)
clock_uncertainty_ns 10,000,850 (10 ms) 102,750–142,400 (~0.1 ms)
device_to_monotonic vs monotonic() -280.84 ms (FAIL) +2.35 / +2.71 ms (PASS)

Roughly 100x worse uncertainty, and a conversion error large enough to fail the harness check outright:

[FAIL] clock/device_to_monotonic: -280.84 ms vs monotonic

Timestamps themselves are fine in both modes — ts/monotonic shows 0 regressions over 4000 packets and ts/nanosecond-scale reports a median inter-packet delta of 33,320 ns, so this is the offset/uncertainty estimation rather than tick-to-ns conversion.

Scope

Independent of instrument count and of the channel-addressing work — it reproduced before and after #195, and on instrument 0 (HUB1), which is otherwise fully functional under Central. So it is not related to #196.

integration.ClockProbeTest.ProbesMaintainUncertainty is intermittent on this bench, which is consistent with a noisy/degraded estimate under Central.

Why it matters

A 280 ms conversion error makes device timestamps unusable for aligning against host-side events in CENTRAL CLIENT mode, which is the only mode available while Central is running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions