The function usleep
has been removed from SUSv4.
(usleep
功能已从SUSv4中删除。)
You should probably use nanosleep
instead or timers ( setitimer
, etc). (您可能应该使用nanosleep
或计时器( setitimer
等)。)
As R.. notes in the comments, should the sleep be implemented as a busy wait:
(正如R ..在评论中指出的那样,应将睡眠实施为繁忙等待:)
- The thread would continue to use the CPU
(线程将继续使用CPU)
- Other (lower-priority) threads wouldn't get a chance to run
(其他(低优先级)线程将无法运行)
Thus:
(从而:)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…