Skip to content

Commit

Permalink
udp-test: The kernel seems to use CLOCK_REALTIME, so use CLOCK_REALTI…
Browse files Browse the repository at this point in the history
…ME instead of CLOCK_MONOTONIC for comparing with kernel timestamps
  • Loading branch information
Feandil committed Aug 21, 2012
1 parent 19eb1f1 commit 76dff49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions udp-test/evallink.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 76dff49

Please sign in to comment.