| /Linux-v5.4/tools/testing/selftests/timers/ |
| D | valid-adjtimex.c | 37 #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 + NSEC_PER_SEC / 2, 1)) in validate_set_offset() [all …]
|
| D | nsleep-lat.c | 29 #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()
|
| D | mqueue-lat.c | 34 #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()
|
| D | alarmtimer-suspend.c | 48 #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()
|
| D | raw_skew.c | 31 #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()
|
| D | nanosleep.c | 32 #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()
|
| D | adjtick.c | 30 #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()
|
| D | leap-a-day.c | 53 #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()
|
| D | set-timer-lat.c | 48 #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()
|
| D | inconsistency-check.c | 34 #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-v5.4/include/linux/ |
| D | acct.h | 70 #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()
|
| D | time64.h | 28 #define NSEC_PER_SEC 1000000000L macro 36 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) 101 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid() 135 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns() 156 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
|
| D | time32.h | 138 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec_valid() 152 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns() 173 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec_add_ns() 207 return ((s64) tv->tv_sec * NSEC_PER_SEC) + in timeval_to_ns()
|
| D | jiffies.h | 63 #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-v5.4/kernel/time/ |
| D | time.c | 468 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec() 471 rem += NSEC_PER_SEC; in ns_to_timespec() 525 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64() 532 nsec -= NSEC_PER_SEC; in set_normalized_timespec64() 537 nsec += NSEC_PER_SEC; in set_normalized_timespec64() 559 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64() 562 rem += NSEC_PER_SEC; in ns_to_timespec64() 665 NSEC_PER_SEC, &rem); in jiffies_to_timespec64() 703 NSEC_PER_SEC, &rem); in jiffies_to_timeval() 713 #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 in jiffies_to_clock_t() [all …]
|
| D | vsyscall.c | 42 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data() 43 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data() 58 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data() 59 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data() 111 vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &vdso_ts->nsec); in update_vsyscall()
|
| /Linux-v5.4/tools/testing/radix-tree/ |
| D | benchmark.c | 12 #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-v5.4/arch/sparc/kernel/ |
| D | vdso.c | 49 (((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-v5.4/drivers/md/bcache/ |
| D | util.c | 205 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-v5.4/fs/proc/ |
| D | uptime.c | 23 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-v5.4/drivers/rtc/ |
| D | rtc-goldfish.c | 48 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() 134 do_div(time, NSEC_PER_SEC); in goldfish_rtc_read_time() 150 now64 = rtc_tm_to_time64(tm) * NSEC_PER_SEC; in goldfish_rtc_set_time() 194 rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; in goldfish_rtc_probe()
|
| /Linux-v5.4/drivers/clocksource/ |
| D | jcore-pit.c | 57 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-v5.4/arch/um/kernel/ |
| D | time.c | 71 unsigned long long interval = NSEC_PER_SEC / HZ; in itimer_set_periodic() 177 err = clocksource_register_hz(&timer_clocksource, NSEC_PER_SEC/TIMER_MULTIPLIER); in um_timer_setup() 194 set_normalized_timespec64(ts, nsecs / NSEC_PER_SEC, in read_persistent_clock64() 195 nsecs % NSEC_PER_SEC); in read_persistent_clock64()
|
| /Linux-v5.4/drivers/pps/generators/ |
| D | pps_gen_parport.c | 80 lim = NSEC_PER_SEC - send_delay - dev->port_write_time; in hrtimer_event() 100 lim = NSEC_PER_SEC - dev->port_write_time; in hrtimer_event() 134 NSEC_PER_SEC - (send_delay + in hrtimer_event() 175 NSEC_PER_SEC - (send_delay + in next_intr_time()
|
| /Linux-v5.4/arch/um/include/shared/ |
| D | common-offsets.h | 9 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); 28 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
|