Sleep function in c, unix

What do I need to import in order to use the sleep function in unix? I know this is windows.h for windows, but what about unix?

+4
source share
3 answers

It should be in unistd.h.

Please note that this only gives you the accuracy of integral seconds.

The most portable way for subgrid precision should be (ab-) using select ().

+7
source

Source: https://habr.com/ru/post/1340034/


All Articles