Home
last modified time | relevance | path

Searched refs:NANOSEC (Results 1 – 25 of 38) sorted by relevance

12

/freebsd-14.2/sys/contrib/openzfs/include/os/freebsd/spl/sys/
H A Dtime.h41 #define NANOSEC 1000000000UL macro
44 #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
45 #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
47 #define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC))
48 #define NSEC2USEC(n) ((n) / (NANOSEC / MICROSEC))
50 #define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
51 #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
64 #define NSEC_TO_TICK(nsec) ((nsec) / (NANOSEC / hz))
73 nsec = ((hrtime_t)ts.tv_sec * NANOSEC) + ts.tv_nsec; in gethrtime()
94 return (((u_int64_t)ts.tv_sec) * NANOSEC + ts.tv_nsec); in gethrtime()
/freebsd-14.2/sys/contrib/openzfs/lib/libspl/include/sys/
H A Dtime.h46 #ifndef NANOSEC
47 #define NANOSEC 1000000000 macro
55 #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
59 #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
63 #define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC))
67 #define NSEC2USEC(n) ((n) / (NANOSEC / MICROSEC))
71 #define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
75 #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
104 return ((((u_int64_t)ts.tv_sec) * NANOSEC) + ts.tv_nsec); in gethrtime()
/freebsd-14.2/sys/cddl/dev/profile/
H A Dprofile.c218 sec = nsec / NANOSEC; in nsec_to_sbt()
219 nsec = nsec % NANOSEC; in nsec_to_sbt()
227 return ((sbt >> 32) * NANOSEC + in sbt_to_nsec()
341 { "ns", NANOSEC / NANOSEC }, in profile_provide()
342 { "nsec", NANOSEC / NANOSEC }, in profile_provide()
343 { "us", NANOSEC / MICROSEC }, in profile_provide()
344 { "usec", NANOSEC / MICROSEC }, in profile_provide()
345 { "ms", NANOSEC / MILLISEC }, in profile_provide()
347 { "s", NANOSEC / SEC }, in profile_provide()
348 { "sec", NANOSEC / SEC }, in profile_provide()
[all …]
/freebsd-14.2/sys/contrib/openzfs/include/os/linux/spl/sys/
H A Dtime.h43 #define NANOSEC 1000000000 macro
45 #define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
46 #define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
48 #define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC))
49 #define NSEC2USEC(n) ((n) / (NANOSEC / MICROSEC))
51 #define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
52 #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
/freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/rates/
H A Dtst.statusrate.d43 inline uint64_t NANOSEC = 1000000000; variable
53 /(this->delta = timestamp - ts) > 2 * NANOSEC/
59 /this->delta <= 2 * NANOSEC/
67 /this->delta > 20 * NANOSEC/
/freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/
H A Dtst.printT.ksh41 inline uint64_t NANOSEC = 1000000000;
45 printf("%T\n%T\n%T", (uint64_t)0, (uint64_t)1062609821 * NANOSEC,
46 (uint64_t)0x7fffffff * NANOSEC);
H A Dtst.printY.ksh41 inline uint64_t NANOSEC = 1000000000;
45 printf("%Y\n%Y\n%Y", (uint64_t)0, (uint64_t)1062609821 * NANOSEC,
46 (uint64_t)0x7fffffff * NANOSEC);
/freebsd-14.2/sys/dev/hyperv/include/
H A Dhyperv.h51 #ifndef NANOSEC
52 #define NANOSEC 1000000000ULL macro
55 #define HYPERV_TIMER_FREQ (NANOSEC / HYPERV_TIMER_NS_FACTOR)
/freebsd-14.2/sys/dev/hyperv/utilities/
H A Dvmbus_timesync.c118 vm_ns = (vm_ts.tv_sec * NANOSEC) + vm_ts.tv_nsec; in vmbus_timesync()
128 hv_ts.tv_sec = hv_ns / NANOSEC; in vmbus_timesync()
129 hv_ts.tv_nsec = hv_ns % NANOSEC; in vmbus_timesync()
160 hv_ts.tv_sec = hv_ns / NANOSEC; in vmbus_timesync()
161 hv_ts.tv_nsec = hv_ns % NANOSEC; in vmbus_timesync()
/freebsd-14.2/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_options.c750 { "ns", NANOSEC / NANOSEC }, in dt_opt_rate()
751 { "nsec", NANOSEC / NANOSEC }, in dt_opt_rate()
752 { "us", NANOSEC / MICROSEC }, in dt_opt_rate()
753 { "usec", NANOSEC / MICROSEC }, in dt_opt_rate()
754 { "ms", NANOSEC / MILLISEC }, in dt_opt_rate()
755 { "msec", NANOSEC / MILLISEC }, in dt_opt_rate()
756 { "s", NANOSEC / SEC }, in dt_opt_rate()
757 { "sec", NANOSEC / SEC }, in dt_opt_rate()
758 { "m", NANOSEC * (hrtime_t)60 }, in dt_opt_rate()
759 { "min", NANOSEC * (hrtime_t)60 }, in dt_opt_rate()
[all …]
H A Ddt_work.c86 tv.tv_sec = (earliest - now) / NANOSEC; in dtrace_sleep()
87 tv.tv_nsec = (earliest - now) % NANOSEC; in dtrace_sleep()
98 tv.tv_sec += earliest / NANOSEC; in dtrace_sleep()
99 tv.tv_nsec += earliest % NANOSEC; in dtrace_sleep()
100 while (tv.tv_nsec > NANOSEC) { in dtrace_sleep()
102 tv.tv_nsec -= NANOSEC; in dtrace_sleep()
/freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/
H A Dtst.sigwait.c34 #define NANOSEC 1000000000 macro
62 ts.it_interval.tv_nsec = NANOSEC / 2; in main()
/freebsd-14.2/sys/contrib/openzfs/lib/libzpool/
H A Dkernel.c371 ts.tv_nsec = tv.tv_usec * NSEC_PER_USEC + (delta % hz) * (NANOSEC / hz); in cv_timedwait()
372 if (ts.tv_nsec >= NANOSEC) { in cv_timedwait()
374 ts.tv_nsec -= NANOSEC; in cv_timedwait()
410 ts.tv_sec = tv.tv_sec + delta / NANOSEC; in cv_timedwait_hires()
411 ts.tv_nsec = tv.tv_usec * NSEC_PER_USEC + (delta % NANOSEC); in cv_timedwait_hires()
412 if (ts.tv_nsec >= NANOSEC) { in cv_timedwait_hires()
414 ts.tv_nsec -= NANOSEC; in cv_timedwait_hires()
H A Dutil.c86 sec = MAX(1, vs->vs_timestamp / NANOSEC); in show_vdev_stats()
/freebsd-14.2/sys/contrib/openzfs/include/sys/
H A Dzfs_delay.h36 delta_us = delta / (NANOSEC / MICROSEC); \
H A Dzfs_context.h614 #define NSEC_TO_TICK(nsec) (howmany((hrtime_t)(nsec) * hz, NANOSEC))
765 ts.tv_sec = delta / NANOSEC; \
766 ts.tv_nsec = delta % NANOSEC; \
/freebsd-14.2/sys/cddl/dev/dtrace/powerpc/
H A Ddtrace_subr.c191 KASSERT(tb_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("Timebase frequency is too low")); in dtrace_gethrtime_init()
200 nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tb_f; in dtrace_gethrtime_init()
/freebsd-14.2/sys/cddl/compat/opensolaris/kern/
H A Dopensolaris.c65 nsec_per_tick = NANOSEC / hz; in opensolaris_load()
/freebsd-14.2/sys/cddl/dev/dtrace/i386/
H A Ddtrace_subr.c308 KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), in dtrace_gethrtime_init()
320 nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; in dtrace_gethrtime_init()
/freebsd-14.2/sys/cddl/dev/dtrace/amd64/
H A Ddtrace_subr.c308 KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), in dtrace_gethrtime_init()
320 nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; in dtrace_gethrtime_init()
/freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/badioctl/
H A Dbadioctl.c76 if ((now = gethrtime()) - last > NANOSEC) { in badioctl()
/freebsd-14.2/cddl/contrib/opensolaris/cmd/lockstat/
H A Dlockstat.c917 ts.it_value.tv_sec = val / NANOSEC; in status_init()
918 ts.it_value.tv_nsec = val % NANOSEC; in status_init()
1772 ((unsigned long long)total_count * NANOSEC) / g_elapsed, in report_stats()
1786 (double)g_elapsed / NANOSEC, in report_stats()
1787 (double)total_count * NANOSEC / g_elapsed); in report_stats()
1866 ((uint64_t)lsp->ls_count * NANOSEC) / g_elapsed); in report_stats()
1928 (uint_t)(((uint64_t)lsp->ls_hist[j] * NANOSEC) / in report_stats()
/freebsd-14.2/sys/contrib/openzfs/lib/libzutil/
H A Dzutil_pool.c158 req.tv_nsec = (sec - (float)req.tv_sec) * NANOSEC; in fsleep()
/freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/
H A Ddtrace.c1249 if (nval <= NANOSEC && (NANOSEC % nval) == 0) {
1251 (long long)NANOSEC / (long long)nval);
1255 if ((nval % NANOSEC) == 0) {
1258 (long long)nval / (long long)NANOSEC);
/freebsd-14.2/sys/contrib/openzfs/cmd/
H A Dztest.c429 static uint64_t zopt_often = 1ULL * NANOSEC; /* every second */
6412 hrtime_t end = gethrtime() + NANOSEC; in ztest_blake3()
6499 hrtime_t end = gethrtime() + NANOSEC; in ztest_fletcher()
6576 hrtime_t end = gethrtime() + NANOSEC; in ztest_fletcher_incr()
7165 (gethrtime() - zs->zs_proc_start) / NANOSEC); in ztest_deadman_thread()
7169 (gethrtime() - zs->zs_proc_start) / NANOSEC); in ztest_deadman_thread()
7196 (double)functime / NANOSEC, zi->zi_funcname); in ztest_execute()
7572 zs->zs_thread_start + ztest_opts.zo_passtime * NANOSEC; in ztest_run()
7577 ztest_random(ztest_opts.zo_passtime * NANOSEC); in ztest_run()
7778 hrtime_t s = t / NANOSEC; in print_time()
[all …]

12