looking for a Sleep() function
I'm looking for a function that will suspend the current thread for several mSec. In Windows this would be Sleep().
What does Linux offer ? I've found udelay() and mdelay() but it involves dragging in include files that then cause other problems. ANy help appreciated. Mike |
man usleep:
NAME usleep - suspend execution for microsecond intervals SYNOPSIS /* BSD version */ #include <unistd.h> void usleep(unsigned long usec); DESCRIPTION The usleep() function suspends execution of the calling process for (at least) usec microseconds. The sleep may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers. |
Excellent !
Many thanks. |
All times are GMT -5. The time now is 06:51 AM. |