Skip to content

Commit

Permalink
better serial debugging timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Sep 16, 2024
1 parent 4de46de commit 9712658
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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");
}
}
Expand Down

0 comments on commit 9712658

Please sign in to comment.