implicit declaration of function usleep

前端 未结 6 1885
庸人自扰
庸人自扰 2020-12-14 07:21
gcc (GCC) 4.6.3
c89

I am trying to use usleep. However, I keep getting the following warning:

implicit declarat

6条回答
  •  执笔经年
    2020-12-14 07:38

    Using nanosleep() instead worked for me.

    On a relevant note: usleep() has been removed since POSIX-2008 and recommends to use nanosleep() instead.

提交回复
热议问题