From 7902028776c531d9cfc87efa80bc312ed4448585 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Fri, 26 Nov 2021 16:26:21 +0100
Subject: [PATCH] Include time stamp in SEQ errors in the log file

---
 old_protocol.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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;
-- 
2.45.2