Sleep in a multi-thread compatible way. sleep() in multiple threads is not trivial because when several threads simultaneously sleep and the first wakes up, the others will instantly wake up, too. See nanosleep() man page
http://www.kernel.org/doc/man-pages/online/pages/man2/nanosleep.2.html
or
http://www.opengroup.org/onlinepubs/007908799/xsh/nanosleep.html
milliseconds to sleep
See Implementation
Sleep in a multi-thread compatible way. sleep() in multiple threads is not trivial because when several threads simultaneously sleep and the first wakes up, the others will instantly wake up, too. See nanosleep() man page
http://www.kernel.org/doc/man-pages/online/pages/man2/nanosleep.2.html
or
http://www.opengroup.org/onlinepubs/007908799/xsh/nanosleep.html