A Linux logger can report a negative interval when a network time update moves its wall clock backwards. The remedy begins with a design decision. Measurements need an elapsed-time clock and records exchanged between systems need a shared time reference.

ArmSoM Sige5 single-board computer · ArmSoM
Keep two time fields for each event
Store wall time for correlation and a monotonic timestamp for intervals on the same boot. Also store a boot identifier so two independent monotonic timelines cannot be joined by accident. On a test logger, collect events before and after time synchronization becomes available. Compare the order and interval lengths reconstructed from each field. For suspend-capable devices, decide whether suspended time belongs in the interval and choose the appropriate Linux clock.
When joining data from two devices, monotonic values have unrelated origins. Carry synchronization status and an estimated offset or shared event if you need to compare observations across devices.
A record created before the first reliable time synchronization should carry that status. This preserves evidence when reviewing a site with intermittent internet access.
Reference material
ArmSoM Sige5 hardware documentation
Linux clock types and monotonic time
