Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
e69608700fa5a6920b3c8ba9951f43f5d4ec0eaa
/
.
/
src
/
unistd
/
usleep.c
blob: 6c96652691e0dabacacde4885f74466d2772a661 [
file
] [
log
] [
blame
]
#define
_GNU_SOURCE
#include
<unistd.h>
#include
<time.h>
int
usleep
(
unsigned
useconds
)
{
struct
timespec tv
=
{
.
tv_sec
=
useconds
/
1000000
,
.
tv_nsec
=
(
useconds
%
1000000
)*
1000
};
return
nanosleep
(&
tv
,
&
tv
);
}