toaruos/libc/unistd/usleep.c
2018-11-29 18:30:59 +09:00

11 lines
214 B
C

#include <unistd.h>
#include <syscall.h>
DEFN_SYSCALL2(nanosleep, 46, unsigned long, unsigned long);
int usleep(useconds_t usec) {
syscall_nanosleep((usec / 10000) / 1000, (usec / 10000) % 1000);
return 0;
}