• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "time32.h"
2 #include <time.h>
3 #include <errno.h>
4 
__clock_nanosleep_time32(clockid_t clk,int flags,const struct timespec32 * req32,struct timespec32 * rem32)5 int __clock_nanosleep_time32(clockid_t clk, int flags, const struct timespec32 *req32, struct timespec32 *rem32)
6 {
7 	struct timespec rem;
8 	int ret = clock_nanosleep(clk, flags, (&(struct timespec){
9 		.tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
10 	if (ret==EINTR && rem32 && !(flags & TIMER_ABSTIME)) {
11 		rem32->tv_sec = rem.tv_sec;
12 		rem32->tv_nsec = rem.tv_nsec;
13 	}
14 	return ret;
15 }
16