From e72093041275298a2e33cb77861ed6b4265336a2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 25 Mar 2019 17:38:05 +0100 Subject: [PATCH] Fix timer --- src/meas_lat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/meas_lat.c b/src/meas_lat.c index 2a0fa2c..ebf39be 100644 --- a/src/meas_lat.c +++ b/src/meas_lat.c @@ -96,6 +96,7 @@ int on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { struct measure_conf* mc = fdinfo->other; s = read(fdinfo->fd, &ticks, sizeof(uint64_t)); + if (s == -1 && errno == EAGAIN) return 0; if (s != sizeof(uint64_t)) { perror("Read error"); exit(EXIT_FAILURE); @@ -124,7 +125,7 @@ int on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { perror("Send error"); //exit(EXIT_FAILURE); } - return 1; + return 0; }