home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Serving the Web
/
ServingTheWeb1995.disc1of1.iso
/
linux
/
slacksrce
/
d
/
libc
/
libc-4.6
/
libc-4
/
libc-linux
/
misc
/
usleep.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-08-05
|
259 b
|
13 lines
#include <unistd.h>
#include <sys/time.h>
void
usleep(unsigned long usec)
{
struct timeval timeout;
timeout.tv_sec = usec / 1000000;
timeout.tv_usec = usec - 1000000 * timeout.tv_sec;
select(1, NULL, NULL, NULL, &timeout);
}