usleep not working, invalid argument error
问题 usleep just isn't waiting any time, the errno variable accuses an invalid argument is being passed on to the function, even if i use the useconds_t type I just get the same error over and over. I have no idea what's going on here, here's the file I made for some testing. #include <stdio.h> #include <unistd.h> #include <errno.h> int main() { unsigned int delay=500000; int err=errno; printf("%d\n", err); usleep(delay); err = errno; printf("%d\n", err); return 0; } strace output: execve("./a.out