Index of Section 3 Manual Pages

Interix / SUAusleep.3Interix / SUA

usleep(3)                                                     usleep(3)

  usleep()

  NAME

    usleep() - suspend process execution for interval of microseconds

  SYNOPSIS

    #include 

    int usleep(useconds_t microseconds)

  DESCRIPTION

    The usleep(3) function suspends the calling thread for at least the number
    of microseconds specified by the microseconds argument. The value of
    microseconds must be less than one million. The function uses the
    SYS_sleep system call to suspend the thread. There is only one timer per
    thread as a result.

    Because of other activity or time spent processing the call, the thread
    can be suspended for longer than the period specified by microseconds.

  RETURN VALUE

    The usleep(3) function exits with status 0 for success, and -1 if an error
    occurred.

  ERRORS

    The usleep(3) function may fail for these reasons:

    [EINVAL]
        The value of microseconds was greater than or equal to one million.

  SEE ALSO

    alarm(2)

    getitimer(2)

    sigaction(2)

    sleep(2)

  USAGE NOTES

    The usleep function is thread safe.

    The usleep function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA