openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
void _dbus_sleep_milliseconds(int milliseconds)
{
#ifdef HAVE_NANOSLEEP
    struct timespec req;
    struct timespec rem;

    req.tv_sec = milliseconds / MILLISECONDS_PER_SECOND;
    req.tv_nsec =
        (milliseconds % MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND;
    rem.tv_sec = 0;
    rem.tv_nsec = 0;

    while (nanosleep(&req, &rem) < 0 && errno == EINTR)
        req = rem;
#elif defined(HAVE_USLEEP)
    usleep(milliseconds * MICROSECONDS_PER_MILLISECOND);
#else /* ! HAVE_USLEEP */
    sleep(MAX(milliseconds / 1000, 1));
#endif
}
/**
 * Sleeps the given number of milliseconds.
 * @param milliseconds number of milliseconds
 */
Sleeps the given number of milliseconds.
@param milliseconds number of milliseconds
Sleeps the given number of milliseconds . @param milliseconds number of milliseconds
void _dbus_sleep_milliseconds(int milliseconds)
{
#ifdef HAVE_NANOSLEEP
    struct timespec req;
    struct timespec rem;
    req.tv_sec = milliseconds / MILLISECONDS_PER_SECOND;
    req.tv_nsec =
        (milliseconds % MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND;
    rem.tv_sec = 0;
    rem.tv_nsec = 0;
    while (nanosleep(&req, &rem) < 0 && errno == EINTR)
        req = rem;
#elif defined(HAVE_USLEEP)
    usleep(milliseconds * MICROSECONDS_PER_MILLISECOND);
#else 
    sleep(MAX(milliseconds / 1000, 1));
#endif
}
void _dbus_sleep_milliseconds ( int milliseconds ) { #ifdef HAVE_NANOSLEEP struct timespec req ; struct timespec rem ; req . tv_sec = milliseconds / MILLISECONDS_PER_SECOND ; req . tv_nsec = ( milliseconds % MILLISECONDS_PER_SECOND ) * NANOSECONDS_PER_MILLISECOND ; rem . tv_sec = 0 ; rem . tv_nsec = 0 ; while ( nanosleep ( & req , & rem ) < 0 && errno == EINTR ) req = rem ; #elif defined ( HAVE_USLEEP ) usleep ( milliseconds * MICROSECONDS_PER_MILLISECOND ) ; #else sleep ( MAX ( milliseconds / 1000 , 1 ) ) ; #endif }
Sleeps the given number of milliseconds.
Sleeps the given number of milliseconds .
/* ! HAVE_USLEEP */