From: Guus Sliepen Date: Mon, 12 Jul 2021 19:55:16 +0000 (+0200) Subject: Use usleep() instead of nanosleep(). X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=e0d2f2168ab8d129f806685a59653c034fee354b;p=meshlink-tiny Use usleep() instead of nanosleep(). --- diff --git a/src/net.c b/src/net.c index d930d1f..af7bbdf 100644 --- a/src/net.c +++ b/src/net.c @@ -151,7 +151,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { if(mesh->contradicting_del_edge > 100 && mesh->contradicting_add_edge > 100) { logger(mesh, MESHLINK_WARNING, "Possible node with same Name as us! Sleeping %d seconds.", mesh->sleeptime); struct timespec ts = {mesh->sleeptime, 0}; - nanosleep(&ts, NULL); + usleep(mesh->sleeptime * 1000000); mesh->sleeptime *= 2; if(mesh->sleeptime < 0) {