1
0

timer_gettime32.c 448 B

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