source: trunk/minix/lib/posix/usleep.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 270 bytes
Line 
1/*
2lib/posix/usleep.c
3*/
4
5#include <unistd.h>
6#include <sys/select.h>
7#include <sys/time.h>
8
9int usleep(useconds_t useconds)
10{
11 int r;
12 struct timeval tv;
13
14 tv.tv_sec= useconds/1000000;
15 tv.tv_usec= useconds % 1000000;
16 r= select(0, NULL, NULL, NULL, &tv);
17 return r;
18}
Note: See TracBrowser for help on using the repository browser.