调试程序发现起了一个子线程后,主线程上的sleep不生效了,看到这才明白...

— Function: unsigned int sleep (unsigned int seconds)

The sleep function waits for seconds or until a signal is delivered, whichever happens first.

If sleep function returns because the requested interval is over, it returns a value of zero. If it returns because of delivery of a signal, its return value is the remaining time in the sleep interval.

参考:http://www.gnu.org/software/libc/manual/html_node/Sleeping.html

相关文章:

  • 2021-10-12
  • 2022-12-23
  • 2022-01-27
  • 2021-09-24
  • 2022-12-23
  • 2022-01-26
  • 2021-06-08
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-03-03
相关资源
相似解决方案