Searched refs:nsec (Results 1 – 6 of 6) sorted by relevance
/kernel/ |
D | time.c | 373 void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec) in set_normalized_timespec() argument 375 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec() 376 nsec -= NSEC_PER_SEC; in set_normalized_timespec() 379 while (nsec < 0) { in set_normalized_timespec() 380 nsec += NSEC_PER_SEC; in set_normalized_timespec() 384 ts->tv_nsec = nsec; in set_normalized_timespec() 394 struct timespec ns_to_timespec(const s64 nsec) in ns_to_timespec() argument 399 if (!nsec) in ns_to_timespec() 402 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec() 419 struct timeval ns_to_timeval(const s64 nsec) in ns_to_timeval() argument [all …]
|
D | sched_debug.c | 34 static long long nsec_high(unsigned long long nsec) in nsec_high() argument 36 if ((long long)nsec < 0) { in nsec_high() 37 nsec = -nsec; in nsec_high() 38 do_div(nsec, 1000000); in nsec_high() 39 return -nsec; in nsec_high() 41 do_div(nsec, 1000000); in nsec_high() 43 return nsec; in nsec_high() 46 static unsigned long nsec_low(unsigned long long nsec) in nsec_low() argument 48 if ((long long)nsec < 0) in nsec_low() 49 nsec = -nsec; in nsec_low() [all …]
|
D | hrtimer.c | 255 ktime_t ktime_add_ns(const ktime_t kt, u64 nsec) in ktime_add_ns() argument 259 if (likely(nsec < NSEC_PER_SEC)) { in ktime_add_ns() 260 tmp.tv64 = nsec; in ktime_add_ns() 262 unsigned long rem = do_div(nsec, NSEC_PER_SEC); in ktime_add_ns() 264 tmp = ktime_set((long)nsec, rem); in ktime_add_ns() 279 ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec) in ktime_sub_ns() argument 283 if (likely(nsec < NSEC_PER_SEC)) { in ktime_sub_ns() 284 tmp.tv64 = nsec; in ktime_sub_ns() 286 unsigned long rem = do_div(nsec, NSEC_PER_SEC); in ktime_sub_ns() 288 tmp = ktime_set((long)nsec, rem); in ktime_sub_ns()
|
/kernel/time/ |
D | timekeeping.c | 53 void update_xtime_cache(u64 nsec) in update_xtime_cache() argument 56 timespec_add_ns(&xtime_cache, nsec); in update_xtime_cache() 73 s64 nsec; in clocksource_forward_now() local 79 nsec = cyc2ns(clock, cycle_delta); in clocksource_forward_now() 80 timespec_add_ns(&xtime, nsec); in clocksource_forward_now() 82 nsec = ((s64)cycle_delta * clock->mult_orig) >> clock->shift; in clocksource_forward_now() 83 clock->raw_time.tv_nsec += nsec; in clocksource_forward_now()
|
/kernel/trace/ |
D | trace.h | 500 extern long ns2usecs(cycle_t nsec);
|
D | trace.c | 129 ns2usecs(cycle_t nsec) in ns2usecs() argument 131 nsec += 500; in ns2usecs() 132 do_div(nsec, 1000); in ns2usecs() 133 return nsec; in ns2usecs()
|