minix/lib/posix/usleep.c

19 lines
270 B
C
Raw Normal View History

2005-07-11 15:08:00 +02:00
/*
lib/posix/usleep.c
*/
#include <unistd.h>
#include <sys/select.h>
#include <sys/time.h>
int usleep(useconds_t useconds)
{
int r;
struct timeval tv;
tv.tv_sec= useconds/1000000;
tv.tv_usec= useconds % 1000000;
r= select(0, NULL, NULL, NULL, &tv);
return r;
}