This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_usleep

Function Documentation

void rc_usleep(unsigned int us)

Sleep in microseconds.

The traditional usleep function, however common, is deprecated in linux as it uses SIGALARM which interferes with alarm and timer functions. This uses the new POSIX standard nanosleep to accomplish the same thing which further supports sleeping for lengths longer than 1 second. This also handles restarting nanosleep with the remaining time in the event that nanosleep is interrupted by a signal. There is no upper limit on the time requested.

Parameters

us[in] microseconds to sleep