sched_rr_get_interval_time32.c 281 B

12345678910111213
  1. #include "time32.h"
  2. #include <time.h>
  3. #include <sched.h>
  4. int __sched_rr_get_interval_time32(pid_t pid, struct timespec32 *ts32)
  5. {
  6. struct timespec ts;
  7. int r = sched_rr_get_interval(pid, &ts);
  8. if (r) return r;
  9. ts32->tv_sec = ts.tv_sec;
  10. ts32->tv_nsec = ts.tv_nsec;
  11. return r;
  12. }