xref: /haiku/src/system/libroot/posix/time/nanosleep.c (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
1 /*
2  * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <time.h>
8 
9 #include <errno.h>
10 
11 #include <errno_private.h>
12 #include <syscall_utils.h>
13 
14 
15 int
16 nanosleep(const struct timespec* time, struct timespec* remainingTime)
17 {
18 	RETURN_AND_SET_ERRNO(
19 		clock_nanosleep(CLOCK_MONOTONIC, 0, time, remainingTime));
20 }
21 
22