From 76dff49c273fcb489a3eee8f61e12f2540dffb0c Mon Sep 17 00:00:00 2001 From: Vincent Brillault Date: Tue, 21 Aug 2012 13:41:15 +0200 Subject: [PATCH] udp-test: The kernel seems to use CLOCK_REALTIME, so use CLOCK_REALTIME instead of CLOCK_MONOTONIC for comparing with kernel timestamps --- udp-test/evallink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udp-test/evallink.c b/udp-test/evallink.c index 60589f1..b48c788 100644 --- a/udp-test/evallink.c +++ b/udp-test/evallink.c @@ -309,7 +309,7 @@ send_cb(struct ev_loop *loop, ev_periodic *periodic, int revents) assert(buffer != NULL); /* Retreive the current clock */ - ret = clock_gettime(CLOCK_MONOTONIC, &stamp); + ret = clock_gettime(CLOCK_REALTIME, &stamp); assert(ret == 0); /* For any node information, evaluate its age and add it to the outgoing buffer */ @@ -464,7 +464,7 @@ update_time() struct timespec stamp; /* Get the current clock */ - tmp = clock_gettime(CLOCK_MONOTONIC, &stamp); + tmp = clock_gettime(CLOCK_REALTIME, &stamp); assert(tmp == 0); /* Update both tables */