Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
6651ef1f060738ee1f50cac1fe6d8ce64c359022
/
.
/
src
/
unistd
/
sleep.c
blob: d64509413e54b5f408a6285ad527d3977cb46556 [
file
] [
log
] [
blame
]
#include
<unistd.h>
#include
<time.h>
unsigned
sleep
(
unsigned
seconds
)
{
struct
timespec tv
=
{
.
tv_sec
=
seconds
,
.
tv_nsec
=
0
};
if
(
nanosleep
(&
tv
,
&
tv
))
return
tv
.
tv_sec
;
return
0
;
}