Sign in
mojo
/
mojo-tools
/
7d579155cc597aa3befcbfad66eef54bda06b57c
/
.
/
fusl
/
src
/
unistd
/
sleep.c
blob: e54f669900eab667bd51db50709dba055294dc2e [
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
;
}