1e4bbf18bSJérôme Duval /* 224df6592SIngo Weinhold * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. 324df6592SIngo Weinhold * Distributed under the terms of the MIT License. 4e4bbf18bSJérôme Duval */ 524df6592SIngo Weinhold 624df6592SIngo Weinhold 7e4bbf18bSJérôme Duval #include <time.h> 824df6592SIngo Weinhold 924df6592SIngo Weinhold #include <errno.h> 1024df6592SIngo Weinhold 11*ae901935SOliver Tappe #include <errno_private.h> 1224df6592SIngo Weinhold #include <syscall_utils.h> 1324df6592SIngo Weinhold 14e4bbf18bSJérôme Duval 15e4bbf18bSJérôme Duval int nanosleep(const struct timespec * time,struct timespec * remainingTime)1624df6592SIngo Weinholdnanosleep(const struct timespec* time, struct timespec* remainingTime) 17e4bbf18bSJérôme Duval { 1824df6592SIngo Weinhold RETURN_AND_SET_ERRNO( 1924df6592SIngo Weinhold clock_nanosleep(CLOCK_MONOTONIC, 0, time, remainingTime)); 20e4bbf18bSJérôme Duval } 21e4bbf18bSJérôme Duval 22