Sign in
fuchsia
/
fuchsia
/
refs/heads/releases/canary
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
unistd
/
sleep.c
blob: 0c1dcafc8205dab101102168805546e73764a257 [
file
] [
log
] [
blame
]
#include
<time.h>
#include
<unistd.h>
unsigned
sleep
(
unsigned
seconds
)
{
struct
timespec tv
=
{.
tv_sec
=
seconds
,
.
tv_nsec
=
0
};
if
(
nanosleep
(&
tv
,
&
tv
))
return
tv
.
tv_sec
;
return
0
;
}