I'm looking for an equivalent function in Linux to the Sleep() function in Windows. That is, a function that holds execution for a certain amount of time without using CPU.
Also, is there any reference for Linux's system calls? Preferably in ebook form, but online works, too.
The time period for the Win32 Sleep function is in milliseconds and can even be INFINITE, in which case the thread will never resume. The Linux sleep function is similar to Sleep, but the time periods are measured in seconds. To obtain the millisecond resolution, use the nanosleep function to provide the same service.