From: c vw Date: Fri, 26 Nov 2021 15:26:21 +0000 (+0100) Subject: Include time stamp in SEQ errors in the log file X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/vdrive/$sch_link?a=commitdiff_plain;h=7902028776c531d9cfc87efa80bc312ed4448585;p=pihpsdr.git Include time stamp in SEQ errors in the log file --- diff --git a/old_protocol.c b/old_protocol.c index 72e581b..e5c6564 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -555,7 +555,11 @@ static gpointer receive_thread(gpointer arg) { // A sequence error with a seqnum of zero usually indicates a METIS restart // and is no error condition if (sequence != 0 && sequence != last_seq_num+1) { - g_print("SEQ ERROR: last %ld, recvd %ld\n", (long) last_seq_num, (long) sequence); + struct timespec ts; + double now; + clock_gettime(CLOCK_MONOTONIC, &ts); + now=ts.tv_sec + 1E-9*ts.tv_nsec; + g_print("SEQ ERROR: T=%0.3f last %ld, recvd %ld\n", now, (long) last_seq_num, (long) sequence); sequence_errors++; } last_seq_num=sequence;