Include "rpm-qa" file.
[nethome.git] / src / misc / usleep.c
1 #include "config.h"
2 #ifndef lint
3 static char rcsid[] ATTR_UNUSED = "$Id$";
4 #endif
5
6 /* This part of code is a public domain */
7
8 #ifdef HAVE_SYS_TIME_H
9 #include <sys/time.h>
10 #endif
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
13 #endif
14 #ifdef HAVE_UNISTD_H
15 #include <unistd.h>
16 #endif
17
18 /* CONFORMING TO BSD 4.3 */
19
20 void usleep(unsigned long usec)
21 {
22 struct timeval tv;
23
24   tv.tv_sec =usec/1000000;
25   tv.tv_usec=usec%1000000;
26   select(0,NULL,NULL,NULL,&tv);
27 }