diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
| commit | 2bc46bd54cc8cdcd7647461f2d76384266f2a0e4 (patch) | |
| tree | 52b77d68abbe5f971f63d2c82df8e933b831b521 /src/unistd/sleep.c | |
| parent | a05e8f1436eecb990d68bc1de8ba28721f1f387d (diff) | |
remove unistd
Diffstat (limited to 'src/unistd/sleep.c')
| -rw-r--r-- | src/unistd/sleep.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/unistd/sleep.c b/src/unistd/sleep.c deleted file mode 100644 index 3cd2996f..00000000 --- a/src/unistd/sleep.c +++ /dev/null @@ -1,29 +0,0 @@ -#if 0 - -#if ((!defined _POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 199309L)) -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199309L /* force struct timespec */ -#endif - -#include <sys/types.h> -#include <time.h> -#include "_syscall.h" - -unsigned sleep(unsigned seconds) -{ - struct timespec tosleep = { seconds, 0 }; - struct timespec remaining = { 0 , 0 }; - - if (__scall2(nanosleep, &tosleep, &remaining) < 0) { - return seconds; - } - - return remaining.tv_sec; -} - -/* -POSIX(1) -*/ - - -#endif |
