repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
loongarch64: add new syscall numbers
[musl.git]
/
src
/
unistd
/
sleep.c
blob
d64509413e54b5f408a6285ad527d3977cb46556
1
#include <unistd.h>
2
#include <time.h>
3
4
unsigned
sleep
(
unsigned
seconds
)
5
{
6
struct
timespec tv
= { .
tv_sec
=
seconds
, .
tv_nsec
=
0
};
7
if
(
nanosleep
(&
tv
, &
tv
))
8
return
tv
.
tv_sec
;
9
return
0
;
10
}