1 #include "time32.h" 2 #include <time.h> 3 #include <sys/timerfd.h> 4 __timerfd_gettime32(int t,struct itimerspec32 * val32)5int __timerfd_gettime32(int t, struct itimerspec32 *val32) 6 { 7 struct itimerspec old; 8 int r = timerfd_gettime(t, &old); 9 if (r) return r; 10 /* No range checking for consistency with settime */ 11 val32->it_interval.tv_sec = old.it_interval.tv_sec; 12 val32->it_interval.tv_nsec = old.it_interval.tv_nsec; 13 val32->it_value.tv_sec = old.it_value.tv_sec; 14 val32->it_value.tv_nsec = old.it_value.tv_nsec; 15 return 0; 16 } 17