usleep.c

Go to the documentation of this file.
00001 /*
00002 lib/posix/usleep.c
00003 */
00004 
00005 #include <unistd.h>
00006 #include <sys/select.h>
00007 #include <sys/time.h>
00008 
00009 int usleep(useconds_t useconds)
00010 {
00011         int r;
00012         struct timeval tv;
00013 
00014         tv.tv_sec= useconds/1000000;
00015         tv.tv_usec= useconds % 1000000;
00016         r= select(0, NULL, NULL, NULL, &tv);
00017         return r;
00018 }

Generated on Fri Apr 14 22:57:27 2006 for minix by  doxygen 1.4.6