What do i need to import to use the sleep function in unix? i know it's windows.h for windows, but what about unix?
It should be in unistd.h.
Please note that this gives you only a precision of integral seconds.
The most portable way for sub-second precision should be (ab-)using select().
#include <unistd.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With