Is there an alternative sleep function in C to milliseconds?

前端 未结 6 459
难免孤独
难免孤独 2020-11-28 19:25

I have some source code that was compiled on Windows. I am converting it to run on Red Hat Linux.

The source code has included the he

6条回答
  •  执笔经年
    2020-11-28 20:14

    Beyond usleep, the humble select with NULL file descriptor sets will let you pause with microsecond precision, and without the risk of SIGALRM complications.

    sigtimedwait and sigwaitinfo offer similar behavior.

提交回复
热议问题