Some SGs have used NTP to set the system clock, so have no GPS records in the raw datastream.
If such a system is using CLOCK_MONOTONIC to record detected pulses, then the current ClockPinner
code isn't able to pin the clock. But on these systems, file timestamps are good, so just use them.
We can use file mtime if that is valid and filename timestamps are invalid or don't exist, but its resolution
is only 1s because it comes from a vfat filesystem.
So:
data sources need to record and export current filename timestamp and current file mtime:
new virtual methods which return 0 unless overridden by a subclass:
But currently, we don't record file mtime in the receiver DB, so make the latter a TODO.
Clock_Repair should include valid file_timestamps in sequence sent to Clock_Pinner
(TODO: or valid file_mtime if file timestamps are invalid/missing (e.g. for .DTA files)).
Some SGs have used NTP to set the system clock, so have no GPS records in the raw datastream. If such a system is using CLOCK_MONOTONIC to record detected pulses, then the current ClockPinner code isn't able to pin the clock. But on these systems, file timestamps are good, so just use them.
We can use file mtime if that is valid and filename timestamps are invalid or don't exist, but its resolution is only 1s because it comes from a vfat filesystem.
So:
data sources need to record and export current filename timestamp and current file mtime:
But currently, we don't record file mtime in the receiver DB, so make the latter a TODO.
Clock_Repair should include valid file_timestamps in sequence sent to
Clock_Pinner
(TODO: or validfile_mtime
if file timestamps are invalid/missing (e.g. for .DTA files)).