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