From 97126584a1f386ed4aee18eee20630086db2bafb Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 16 Sep 2024 13:20:00 +0200 Subject: [PATCH] better serial debugging timestamps --- net_io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net_io.c b/net_io.c index f8fd78b5..f5aaa305 100644 --- a/net_io.c +++ b/net_io.c @@ -4434,12 +4434,12 @@ static int readClient(struct client *c, int64_t now) { } else { // read instead of recv for modesbeast / gns-hulc .... if (Modes.debug_serial) { - fprintTimePrecise(stderr, now); + fprintTimePrecise(stderr, mstime()); fprintf(stderr, " serial read ... fd: %d maxbytes: %d\n", c->fd, left); } nread = read(c->fd, c->buf + c->buflen, left); if (Modes.debug_serial) { - fprintTimePrecise(stderr, now); + fprintTimePrecise(stderr, mstime()); fprintf(stderr, " serial read return value: %d\n", nread); } } @@ -5420,7 +5420,7 @@ void modesNetPeriodicWork(void) { Modes.services_out.event_progress = 0; if (Modes.debug_serial) { - fprintTimePrecise(stderr, now); fprintf(stderr, " event count %d wait_ms %d\n", Modes.net_event_count, (int) wait_ms); + fprintTimePrecise(stderr, mstime()); fprintf(stderr, " event count %d wait_ms %d\n", Modes.net_event_count, (int) wait_ms); } if (0 && Modes.net_event_count > 0) { @@ -5465,12 +5465,12 @@ void modesNetPeriodicWork(void) { if (Modes.sdrInitialized && (Modes.sdr_type == SDR_MODESBEAST || Modes.sdr_type == SDR_GNS)) { if (!Modes.serial_client) { if (Modes.debug_serial) { - fprintTimePrecise(stderr, now); + fprintTimePrecise(stderr, mstime()); fprintf(stderr, " serial: creating socket client ... \n"); } Modes.serial_client = createSocketClient(Modes.beast_in_service, Modes.beast_fd); if (Modes.debug_serial) { - fprintTimePrecise(stderr, now); + fprintTimePrecise(stderr, mstime()); fprintf(stderr, " serial: creating socket client ... done\n"); } }