We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 509df07 commit 898f590Copy full SHA for 898f590
main.c
@@ -444,7 +444,7 @@ static void poll_loop(const poll_loop_args_t* args)
444
unsigned sleep_ms = sleep_time_ms(args, &m);
445
debug("adaptive sleep time: %d ms\n", sleep_ms);
446
struct timespec req = { .tv_sec = (time_t)(sleep_ms / 1000), .tv_nsec = (sleep_ms % 1000) * 1000000 };
447
- nanosleep(&req, NULL);
+ while(nanosleep(&req, &req) == -1 && errno == EINTR);
448
report_countdown_ms -= (int)sleep_ms;
449
}
450
0 commit comments