repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git]
/
lib
/
posix
/
usleep.c
blob
964e2aac80c0643301aaaf30e5cf7385eff2b99c
1
/*
2
lib/posix/usleep.c
3
*/
4
5
#include <unistd.h>
6
#include <sys/select.h>
7
#include <sys/time.h>
8
9
int
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
}