If I want to do long delta-t calculations, what is the correct strategy to correlate these acquisition runs to wall-clock time?
Do I record the start time as given by the (PTP disciplined) system clock clock_gettime(), then schedule an acquisition to start at the next PPS/sync? How does one ensure that the recorded "start time" is actually the correct time?
If for example I would like to start acquiring at t=0, at t=-1 I would record the current UTC time (call it system_time), schedule an acquisition to start on the next sync/PPS, and then record the start time as system_time + 1. It seems to me that this would fail if a leap second were inserted at t=1.
Is it perhaps better to do my calculations in CLOCK_TAI, add one second, and then convert back to UTC?
Or, just record everything in TAI?