Home
last modified time | relevance | path

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

12345678910>>...15

/linux/tools/testing/selftests/timers/
A Dvalid-adjtimex.c37 #define NSEC_PER_SEC 1000000000LL macro
210 tmx.time.tv_usec += NSEC_PER_SEC; in set_offset()
257 if (set_offset(NSEC_PER_SEC - 1, 1)) in validate_set_offset()
260 if (set_offset(-NSEC_PER_SEC + 1, 1)) in validate_set_offset()
263 if (set_offset(-NSEC_PER_SEC - 1, 1)) in validate_set_offset()
266 if (set_offset(5 * NSEC_PER_SEC, 1)) in validate_set_offset()
269 if (set_offset(-5 * NSEC_PER_SEC, 1)) in validate_set_offset()
272 if (set_offset(5 * NSEC_PER_SEC + NSEC_PER_SEC / 2, 1)) in validate_set_offset()
275 if (set_offset(-5 * NSEC_PER_SEC - NSEC_PER_SEC / 2, 1)) in validate_set_offset()
308 if (set_bad_offset(0, NSEC_PER_SEC, 1)) in validate_set_offset()
[all …]
A 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()
161 while (length <= (NSEC_PER_SEC * 10)) { in main()
A 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()
A 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()
A 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()
127 eppm = ((delta2-delta1)*NSEC_PER_SEC)/interval; in main()
A 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()
148 while (length <= (NSEC_PER_SEC * 10)) { in main()
A 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()
A 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()
/linux/include/linux/
A 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()
A Dtime64.h29 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
30 #define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC)
95 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid()
136 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns()
157 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
/linux/kernel/time/
A Dtime.c480 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
487 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
492 nsec += NSEC_PER_SEC; in set_normalized_timespec64()
521 ts.tv_nsec = NSEC_PER_SEC - rem - 1; in ns_to_timespec64()
613 NSEC_PER_SEC, &rem); in jiffies_to_timespec64()
676 #if (NSEC_PER_SEC % USER_HZ) == 0 in nsec_to_clock_t()
677 return div_u64(x, NSEC_PER_SEC / USER_HZ); in nsec_to_clock_t()
692 #if !(NSEC_PER_SEC % HZ) in jiffies64_to_nsecs()
693 return (NSEC_PER_SEC / HZ) * j; in jiffies64_to_nsecs()
725 #if (NSEC_PER_SEC % HZ) == 0 in nsecs_to_jiffies64()
[all …]
A Dvsyscall.c39 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
40 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
55 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
56 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
101 vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &vdso_ts->nsec); in update_vsyscall()
/linux/tools/testing/radix-tree/
A Dbenchmark.c12 #define NSEC_PER_SEC 1000000000L macro
38 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter()
42 if (loops == 1 && nsec * 5 < NSEC_PER_SEC) { in benchmark_iter()
43 loops = NSEC_PER_SEC / nsec / 4 + 1; in benchmark_iter()
66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert()
87 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_tagging()
108 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_delete()
/linux/tools/testing/selftests/vm/
A Dksm_tests.c540 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_merge_hugepages_time()
541 scan_time_ns % NSEC_PER_SEC); in ksm_merge_hugepages_time()
543 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_hugepages_time()
581 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_merge_time()
582 scan_time_ns % NSEC_PER_SEC); in ksm_merge_time()
584 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_time()
624 printf("Total time: %ld.%09ld s\n", cow_time_ns / NSEC_PER_SEC, in ksm_cow_time()
625 cow_time_ns % NSEC_PER_SEC); in ksm_cow_time()
627 ((double)cow_time_ns / NSEC_PER_SEC)); in ksm_cow_time()
653 cow_time_ns % NSEC_PER_SEC); in ksm_cow_time()
[all …]
/linux/tools/testing/selftests/timens/
A Dfutex.c18 #define NSEC_PER_SEC 1000000000ULL macro
30 timeout.tv_nsec += NSEC_PER_SEC / 10; // 100ms in run_test()
31 if (timeout.tv_nsec > NSEC_PER_SEC) { in run_test()
33 timeout.tv_nsec -= NSEC_PER_SEC; in run_test()
/linux/arch/sparc/kernel/
A Dvdso.c48 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
50 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
63 while (vdata->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
64 vdata->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/linux/drivers/md/bcache/
A 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/drivers/pwm/
A Dpwm-sun4i.c132 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state()
161 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state()
164 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state()
180 (state->period * clk_rate >= NSEC_PER_SEC) && in sun4i_pwm_calculate()
181 (state->period * clk_rate < 2 * NSEC_PER_SEC) && in sun4i_pwm_calculate()
182 (state->duty_cycle * clk_rate * 2 >= NSEC_PER_SEC); in sun4i_pwm_calculate()
196 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate()
197 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
213 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
A Dpwm-bcm2835.c91 max_period = DIV_ROUND_UP_ULL((u64)U32_MAX * NSEC_PER_SEC + NSEC_PER_SEC / 2, rate) - 1; in bcm2835_pwm_apply()
97 period_cycles = DIV_ROUND_CLOSEST_ULL(state->period * rate, NSEC_PER_SEC); in bcm2835_pwm_apply()
106 val = DIV_ROUND_CLOSEST_ULL(state->duty_cycle * rate, NSEC_PER_SEC); in bcm2835_pwm_apply()
/linux/fs/proc/
A Duptime.c30 idle.tv_sec = div_u64_rem(idle_nsec, NSEC_PER_SEC, &rem); in uptime_proc_show()
34 (uptime.tv_nsec / (NSEC_PER_SEC / 100)), in uptime_proc_show()
36 (idle.tv_nsec / (NSEC_PER_SEC / 100))); in uptime_proc_show()
/linux/drivers/clocksource/
A 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()
A Dhyperv_timer.c393 (NSEC_PER_SEC / HV_CLOCK_HZ); in read_hv_sched_clock_tsc()
461 (NSEC_PER_SEC / HV_CLOCK_HZ); in read_hv_sched_clock_msr()
484 sched_clock_register(sched_clock, 64, NSEC_PER_SEC); in hv_setup_sched_clock()
538 clocksource_register_hz(&hyperv_cs_tsc, NSEC_PER_SEC/100); in hv_init_tsc_clocksource()
563 clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100); in hv_init_clocksource()
/linux/drivers/rtc/
A Drtc-goldfish.c48 do_div(rtc_alarm, NSEC_PER_SEC); in goldfish_rtc_read_alarm()
73 rtc_alarm64 = rtc_tm_to_time64(&alrm->time) * NSEC_PER_SEC; in goldfish_rtc_set_alarm()
135 do_div(time, NSEC_PER_SEC); in goldfish_rtc_read_time()
151 now64 = rtc_tm_to_time64(tm) * NSEC_PER_SEC; in goldfish_rtc_set_time()
189 rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; in goldfish_rtc_probe()
/linux/tools/testing/selftests/ptp/
A Dtestptp.c38 #define NSEC_PER_SEC 1000000000LL macro
423 perout_request.period.sec = perout / NSEC_PER_SEC; in main()
424 perout_request.period.nsec = perout % NSEC_PER_SEC; in main()
428 perout_request.on.sec = pulsewidth / NSEC_PER_SEC; in main()
429 perout_request.on.nsec = pulsewidth % NSEC_PER_SEC; in main()
433 perout_request.phase.sec = perout_phase / NSEC_PER_SEC; in main()
434 perout_request.phase.nsec = perout_phase % NSEC_PER_SEC; in main()
/linux/tools/testing/selftests/kvm/x86_64/
A Dkvm_clock_test.c28 { .kvmclock_base = 180 * NSEC_PER_SEC },
29 { .kvmclock_base = 0, .realtime_offset = -180 * NSEC_PER_SEC },
30 { .kvmclock_base = 0, .realtime_offset = 180 * NSEC_PER_SEC },
100 data.realtime = ts.tv_sec * NSEC_PER_SEC; in setup_clock()

Completed in 25 milliseconds

12345678910>>...15