From 656fb082a3ab596555ba661ee98ab8400f9dd4f1 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sat, 6 Aug 2016 02:46:15 +0200 Subject: tools: oping: Fix wrong delay calculation --- src/tools/oping/oping_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c index b47eee6c..0d4a10af 100644 --- a/src/tools/oping/oping_client.c +++ b/src/tools/oping/oping_client.c @@ -115,7 +115,8 @@ void * writer(void * o) { int * fdp = (int *) o; struct timespec now; - struct timespec wait = {client.interval / 1000, client.interval % 1000}; + struct timespec wait = {client.interval / 1000, + (client.interval % 1000) * MILLION}; struct oping_msg * msg; char * buf = malloc(client.size); -- cgit v1.2.3