| --- a/programs/pluto/send.c | |
| +++ b/programs/pluto/send.c | |
| @@ -26,7 +26,7 @@ | |
| * | |
| */ | |
| -#include <unistd.h> /* for usleep() */ | |
| +#include <time.h> /* for nanosleep() */ | |
| #include <errno.h> | |
| #include "defs.h" | |
| @@ -192,7 +192,8 @@ static bool send_shunks(const char *wher | |
| */ | |
| if (impair.jacob_two_two) { | |
| /* sleep for half a second, and second another packet */ | |
| - usleep(500000); | |
| + const struct timespec req = {0, 500 * 1000 * 1000}; | |
| + nanosleep(&req, NULL); | |
| endpoint_buf b; | |
| endpoint_buf ib; | |
| llog(RC_LOG, logger, |