Home
last modified time | relevance | path

Searched refs:NSEC_PER_SEC (Results 1 – 25 of 251) sorted by relevance

1234567891011

/Linux-v4.19/tools/testing/selftests/timers/
Dvalid-adjtimex.c37 #define NSEC_PER_SEC 1000000000LL macro
204 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset()
205 tmx.time.tv_usec = offset % NSEC_PER_SEC; in set_offset()
209 tmx.time.tv_usec += NSEC_PER_SEC; in set_offset()
255 if (set_offset(NSEC_PER_SEC - 1, 1)) in validate_set_offset()
258 if (set_offset(-NSEC_PER_SEC + 1, 1)) in validate_set_offset()
261 if (set_offset(-NSEC_PER_SEC - 1, 1)) in validate_set_offset()
264 if (set_offset(5 * NSEC_PER_SEC, 1)) in validate_set_offset()
267 if (set_offset(-5 * NSEC_PER_SEC, 1)) in validate_set_offset()
270 if (set_offset(5 * NSEC_PER_SEC + NSEC_PER_SEC / 2, 1)) in validate_set_offset()
[all …]
Dnsleep-lat.c29 #define NSEC_PER_SEC 1000000000ULL macro
82 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
83 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
92 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
94 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
104 target.tv_sec = ns/NSEC_PER_SEC; in nanosleep_lat_test()
105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
160 while (length <= (NSEC_PER_SEC * 10)) { in main()
Dmqueue-lat.c34 #define NSEC_PER_SEC 1000000000ULL macro
42 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
44 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
51 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
52 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
Dalarmtimer-suspend.c48 #define NSEC_PER_SEC 1000000000ULL macro
49 #define UNREASONABLE_LAT (NSEC_PER_SEC * 5) /* hopefully we resume in 5 secs */
89 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
91 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
106 delta_ns -= NSEC_PER_SEC * SUSPEND_SECS * alarmcount; in sigalarm()
Draw_skew.c31 #define NSEC_PER_SEC 1000000000LL macro
48 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
55 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
56 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
126 eppm = ((delta2-delta1)*NSEC_PER_SEC)/interval; in main()
Dnanosleep.c32 #define NSEC_PER_SEC 1000000000ULL macro
94 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
95 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
147 while (length <= (NSEC_PER_SEC * 10)) { in main()
Dadjtick.c30 #define NSEC_PER_SEC 1000000000LL macro
46 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
53 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
54 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
Dleap-a-day.c53 #define NSEC_PER_SEC 1000000000ULL macro
74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
165 target = timespec_add(now, NSEC_PER_SEC/2); in test_hrtimer_failure()
356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
Dset-timer-lat.c48 #define NSEC_PER_SEC 1000000000ULL macro
90 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
92 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
106 delta_ns -= NSEC_PER_SEC * TIMER_SECS * alarmcount; in sigalarm()
Dinconsistency-check.c34 #define NSEC_PER_SEC 1000000000ULL macro
134 delta = list[inconsistent].tv_sec * NSEC_PER_SEC; in consistency_test()
136 delta -= list[inconsistent+1].tv_sec * NSEC_PER_SEC; in consistency_test()
/Linux-v4.19/kernel/time/
Dtime.c358 } else if (gran == NSEC_PER_SEC) { in timespec_trunc()
360 } else if (gran > 1 && gran < NSEC_PER_SEC) { in timespec_trunc()
426 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec()
433 nsec -= NSEC_PER_SEC; in set_normalized_timespec()
438 nsec += NSEC_PER_SEC; in set_normalized_timespec()
460 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec()
463 rem += NSEC_PER_SEC; in ns_to_timespec()
517 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
524 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
529 nsec += NSEC_PER_SEC; in set_normalized_timespec64()
[all …]
/Linux-v4.19/include/linux/
Dacct.h70 #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 in jiffies_to_AHZ()
78 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ()
85 #if (NSEC_PER_SEC % AHZ) == 0 in nsec_to_AHZ()
86 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ()
89 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ()
97 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
Dtime64.h36 #define NSEC_PER_SEC 1000000000L macro
42 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
96 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid()
120 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns()
141 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
Dtime32.h103 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec_valid()
127 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns()
148 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec_add_ns()
197 return ((s64) tv->tv_sec * NSEC_PER_SEC) + in timeval_to_ns()
Djiffies.h63 #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ)
264 #if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
269 #define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) +\
281 (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC)
284 (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)
/Linux-v4.19/tools/testing/radix-tree/
Dbenchmark.c23 #define NSEC_PER_SEC 1000000000L macro
49 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter()
53 if (loops == 1 && nsec * 5 < NSEC_PER_SEC) { in benchmark_iter()
54 loops = NSEC_PER_SEC / nsec / 4 + 1; in benchmark_iter()
77 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert()
98 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_tagging()
120 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_delete()
161 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in __benchmark_split()
204 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in __benchmark_join()
/Linux-v4.19/arch/sparc/kernel/
Dvdso.c49 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
51 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
64 while (vdata->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
65 vdata->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/Linux-v4.19/arch/x86/entry/vsyscall/
Dvsyscall_gtod.c57 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
59 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
72 while (vdata->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
73 vdata->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/Linux-v4.19/drivers/md/bcache/
Dutil.c205 d->next += div_u64(done * NSEC_PER_SEC, atomic_long_read(&d->rate)); in bch_next_delay()
213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay()
214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay()
216 if (time_after64(now - NSEC_PER_SEC * 2, d->next)) in bch_next_delay()
217 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay()
220 ? div_u64(d->next - now, NSEC_PER_SEC / HZ) in bch_next_delay()
/Linux-v4.19/fs/proc/
Duptime.c23 idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in uptime_proc_show()
27 (uptime.tv_nsec / (NSEC_PER_SEC / 100)), in uptime_proc_show()
29 (idle.tv_nsec / (NSEC_PER_SEC / 100))); in uptime_proc_show()
/Linux-v4.19/drivers/clocksource/
Djcore-pit.c57 return seclo * NSEC_PER_SEC + nsec; in jcore_sched_clock_read()
116 freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd); in jcore_pit_local_init()
117 pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); in jcore_pit_local_init()
159 NSEC_PER_SEC, 400, 32, in jcore_pit_init()
166 sched_clock_register(jcore_sched_clock_read, 32, NSEC_PER_SEC); in jcore_pit_init()
/Linux-v4.19/arch/um/kernel/
Dtime.c116 err = clocksource_register_hz(&timer_clocksource, NSEC_PER_SEC/TIMER_MULTIPLIER); in um_timer_setup()
128 set_normalized_timespec64(ts, nsecs / NSEC_PER_SEC, in read_persistent_clock64()
129 nsecs % NSEC_PER_SEC); in read_persistent_clock64()
/Linux-v4.19/drivers/pwm/
Dpwm-sun4i.c141 tmp = prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state()
144 tmp = prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state()
166 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate()
167 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
181 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
196 div = (u64)pval * NSEC_PER_SEC * *prd; in sun4i_pwm_calculate()
199 div = (u64)pval * NSEC_PER_SEC * *dty; in sun4i_pwm_calculate()
/Linux-v4.19/drivers/pps/generators/
Dpps_gen_parport.c94 lim = NSEC_PER_SEC - send_delay - dev->port_write_time; in hrtimer_event()
114 lim = NSEC_PER_SEC - dev->port_write_time; in hrtimer_event()
148 NSEC_PER_SEC - (send_delay + in hrtimer_event()
189 NSEC_PER_SEC - (send_delay + in next_intr_time()
/Linux-v4.19/drivers/rtc/
Drtc-goldfish.c56 do_div(rtc_alarm, NSEC_PER_SEC); in goldfish_rtc_read_alarm()
87 rtc_alarm64 = rtc_alarm * NSEC_PER_SEC; in goldfish_rtc_set_alarm()
148 do_div(time, NSEC_PER_SEC); in goldfish_rtc_read_time()
168 now64 = now * NSEC_PER_SEC; in goldfish_rtc_set_time()

1234567891011