Lines Matching refs:tp
481 static int sgi_clock_get(clockid_t clockid, struct timespec *tp) in sgi_clock_get() argument
487 *tp = ns_to_timespec(nsec); in sgi_clock_get()
488 tp->tv_sec += sgi_clock_offset.tv_sec; in sgi_clock_get()
492 static int sgi_clock_set(const clockid_t clockid, const struct timespec *tp) in sgi_clock_set() argument
500 sgi_clock_offset.tv_sec = tp->tv_sec - div_u64_rem(nsec, NSEC_PER_SEC, &rem); in sgi_clock_set()
502 if (rem <= tp->tv_nsec) in sgi_clock_set()
503 sgi_clock_offset.tv_nsec = tp->tv_sec - rem; in sgi_clock_set()
505 sgi_clock_offset.tv_nsec = tp->tv_sec + NSEC_PER_SEC - rem; in sgi_clock_set()
768 static int sgi_clock_getres(const clockid_t which_clock, struct timespec *tp) in sgi_clock_getres() argument
770 tp->tv_sec = 0; in sgi_clock_getres()
771 tp->tv_nsec = sgi_clock_period; in sgi_clock_getres()