Back to index

glibc  2.9
Functions
usleep.c File Reference
#include <time.h>
#include <unistd.h>
#include <errno.h>

Go to the source code of this file.

Functions

int __libc_nanosleep (const struct timespec *requested_time, struct timespec *remaining)
int usleep (useconds_t useconds)

Function Documentation

int __libc_nanosleep ( const struct timespec requested_time,
struct timespec remaining 
)

Definition at line 33 of file nanosleep.c.

{
  assert (sizeof (struct timestruc_t) == sizeof (*req));
  return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem);
}

Here is the call graph for this function:

int usleep ( useconds_t  useconds)

Definition at line 28 of file usleep.c.

{
  struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000};
  __libc_nanosleep(&ts,&ts);
  return 0;
}

Here is the call graph for this function: