我需要导入什么才能在unix中使用睡眠功能?我知道windows 是windows.h,但是unix 呢?
它应该位于 unistd.h 中。
请注意,这只能提供整数秒的精度。
亚秒精度最便携的方法应该是(ab-)使用 select()。