Home
last modified time | relevance | path

Searched refs:NSEC_PER_SEC (Results 1 - 25 of 732) sorted by relevance

12345678910>>...30

/kernel/linux/linux-5.10/tools/testing/selftests/timers/
H A Dvalid-adjtimex.c37 #define NSEC_PER_SEC 1000000000LL macro
205 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset()
206 tmx.time.tv_usec = offset % NSEC_PER_SEC; in set_offset()
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 in validate_set_offset()
[all...]
H 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()
H 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()
H 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()
H 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()
/kernel/linux/linux-6.6/tools/testing/selftests/timers/
H A Dvalid-adjtimex.c37 #define NSEC_PER_SEC 1000000000LL macro
205 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset()
206 tmx.time.tv_usec = offset % NSEC_PER_SEC; in set_offset()
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 in validate_set_offset()
[all...]
H 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()
H 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()
H 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()
H 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()
/kernel/linux/linux-5.10/include/linux/
H 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()
/kernel/linux/linux-6.6/include/linux/
H A Dacct.h69 #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 in jiffies_to_AHZ()
77 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ()
84 #if (NSEC_PER_SEC % AHZ) == 0 in nsec_to_AHZ()
85 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ()
88 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ()
96 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
H A Dtime64.h32 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
33 #define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC)
98 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid()
139 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns()
160 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
/kernel/linux/linux-5.10/tools/testing/radix-tree/
H 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()
/kernel/linux/linux-6.6/tools/testing/radix-tree/
H 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()
/kernel/linux/linux-5.10/kernel/time/
H A Dtime.c475 * 0 <= tv_nsec < NSEC_PER_SEC
480 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()
512 ts.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64()
520 ts.tv_sec = -div_u64_rem(-nsec - 1, NSEC_PER_SEC, &rem) - 1; in ns_to_timespec64()
521 ts.tv_nsec = NSEC_PER_SEC - rem - 1; in ns_to_timespec64()
578 * well formed timespecs should have tv_nsec < NSEC_PER_SEC, so we're
613 NSEC_PER_SEC, &rem); in jiffies_to_timespec64()
623 #if (TICK_NSEC % (NSEC_PER_SEC / USER_H in jiffies_to_clock_t()
[all...]
H 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()
/kernel/linux/linux-6.6/kernel/time/
H A Dtime.c492 * Note: The tv_nsec part is always in the range of 0 <= tv_nsec < NSEC_PER_SEC.
497 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
504 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
509 nsec += NSEC_PER_SEC; in set_normalized_timespec64()
529 ts.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64()
537 ts.tv_sec = -div_u64_rem(-nsec - 1, NSEC_PER_SEC, &rem) - 1; in ns_to_timespec64()
538 ts.tv_nsec = NSEC_PER_SEC - rem - 1; in ns_to_timespec64()
606 * well formed timespecs should have tv_nsec < NSEC_PER_SEC, so we're
647 NSEC_PER_SEC, &rem); in jiffies_to_timespec64()
664 #if (TICK_NSEC % (NSEC_PER_SEC / USER_H in jiffies_to_clock_t()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dksm_tests.c600 scan_time_ns = (end_time.tv_sec - start_time.tv_sec) * NSEC_PER_SEC + in ksm_merge_hugepages_time()
604 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_merge_hugepages_time()
605 scan_time_ns % NSEC_PER_SEC); in ksm_merge_hugepages_time()
607 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_hugepages_time()
641 scan_time_ns = (end_time.tv_sec - start_time.tv_sec) * NSEC_PER_SEC + in ksm_merge_time()
645 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_merge_time()
646 scan_time_ns % NSEC_PER_SEC); in ksm_merge_time()
648 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_time()
688 scan_time_ns = (end_time.tv_sec - start_time.tv_sec) * NSEC_PER_SEC + in ksm_unmerge_time()
692 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_unmerge_time()
[all...]
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/octeontx2/af/
H A Dptp.c131 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - ptp_clock_hi)); in ptp_reset_thresh()
134 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - delta_ns)); in ptp_reset_thresh()
147 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - start_ns)); in ptp_hrtimer_start()
168 return sec * NSEC_PER_SEC + nsec; in read_ptp_tstmp_sec_nsec()
194 cycle_time = NSEC_PER_SEC * CYCLE_MULT / ptp_clock_freq; in ptp_calc_adjusted_comp()
201 while (ptp_clock_nsec < NSEC_PER_SEC) { in ptp_calc_adjusted_comp()
208 ns_drift = ptp_clock_nsec - NSEC_PER_SEC; in ptp_calc_adjusted_comp()
259 writeq(timestamp / NSEC_PER_SEC, in ptp_atomic_update()
262 nxt_rollover_set = roundup(timestamp, NSEC_PER_SEC); in ptp_atomic_update()
263 curr_rollover_set = nxt_rollover_set - NSEC_PER_SEC; in ptp_atomic_update()
[all...]
/kernel/linux/linux-5.10/arch/sparc/kernel/
H 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()
/kernel/linux/linux-5.10/tools/testing/selftests/timens/
H 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()
/kernel/linux/linux-6.6/arch/sparc/kernel/
H 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()
/kernel/linux/linux-6.6/tools/testing/selftests/timens/
H 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()
/kernel/linux/linux-5.10/fs/proc/
H 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()

Completed in 12 milliseconds

12345678910>>...30