Commit 44637de3 authored by Cedric Roux's avatar Cedric Roux

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.)
parent e6ce301e
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment