From BRTT
How is it possible that I have negative time gaps in the gap table?!
orb2db writes out various diagnostic tables; the gap table indicates apparent gaps between one packet and the next. Negative gaps indicate a packet with a time before a previous packet.
Some data collection systems produce out of order packets. When the
numbers of out of order packets are small, orb2db can reorder the
packets as they're received, provided the max_out_of_sequence parameter
in orb2db.pf is set properly. However, the CD1 protocol can produce
a mixture of relatively recent packets in time order interspersed with
packets up to seven days old in reverse order. orb2db cannot reorder
these packets, and its parameter file must be specially configured
to specify max_out_of_sequence set to zero, and the output datatype
to some uncompressed format like s4. This situation will generate
very large numbers of wfdisc rows, which must be post processed to
compress both the wfdisc table and the waveform data. In addition,
the gap table is not very useful in this case, so the parameter record_gap
should be set to no.
Finally, many dataloggers occasionally lose their clock, which can cause negative gaps either when the clock goes haywire, or when its reset.