T hacks: minor bugfix: don't log more than once
In time_meas.c, when getting 0 for the event, we log delta time with previous 1 for the event. "start_valid" was not cleared, so receiving a second 0 without 1 in between may lead to wrong logging. Should not happen in practice, but still, little bug. (Note: we don't protect against streams of 1, but this case should also not happen.)
This commit is contained in:
@@ -104,6 +104,7 @@ printf("yo %d\n", on_off);
|
||||
}
|
||||
if (on_off != 0) { printf("fatal!\n"); abort(); }
|
||||
if (!start_valid) continue;
|
||||
start_valid = 0;
|
||||
stop_time = e.sending_time;
|
||||
delta_time = time_sub(stop_time, start_time);
|
||||
fprintf(stderr, "%ld\n",
|
||||
|
||||
Reference in New Issue
Block a user