summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/oping/oping_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c
index 4b01315d..b60c73cb 100644
--- a/src/tools/oping/oping_client.c
+++ b/src/tools/oping/oping_client.c
@@ -193,8 +193,6 @@ void * writer(void * o)
pthread_cleanup_push(free, buf);
while (!stop && client.sent < client.count) {
- nanosleep(&wait, NULL);
-
clock_gettime(CLOCK_MONOTONIC, &now);
msg->type = htonl(ECHO_REQUEST);
@@ -206,6 +204,8 @@ void * writer(void * o)
printf("Failed to send packet.\n");
stop = true;
}
+
+ nanosleep(&wait, NULL);
}
pthread_cleanup_pop(true);