# | Line 157 | Line 157 | comm_select(void) | |
---|---|---|
157 | ||
158 | if (num < 0) | |
159 | { | |
160 | < | #ifdef HAVE_USLEEP |
161 | < | usleep(50000); /* avoid 99% CPU in comm_select */ |
162 | < | #endif |
160 | > | const struct timespec req = { .tv_sec = 0, .tv_nsec = 50000000 }; |
161 | > | nanosleep(&req, NULL); /* Avoid 99% CPU in comm_select */ |
162 | return; | |
163 | } | |
164 |
– | Removed lines |
+ | Added lines |
< | Changed lines (old) |
> | Changed lines (new) |