7#ifndef ZEPHYR_INCLUDE_TIME_UNITS_H_
8#define ZEPHYR_INCLUDE_TIME_UNITS_H_
21#define SYS_FOREVER_MS (-1)
25#define SYS_TIMEOUT_MS(ms) ((ms) == SYS_FOREVER_MS ? K_FOREVER : K_MSEC(ms))
29#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
30__syscall
int sys_clock_hw_cycles_per_sec_runtime_get(
void);
32static inline int z_impl_sys_clock_hw_cycles_per_sec_runtime_get(
void)
34 extern int z_clock_hw_cycles_per_sec;
36 return z_clock_hw_cycles_per_sec;
40#if defined(__cplusplus) && __cplusplus >= 201402L
41 #if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
42 #define TIME_CONSTEXPR
44 #define TIME_CONSTEXPR constexpr
47 #define TIME_CONSTEXPR
52#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
53 return sys_clock_hw_cycles_per_sec_runtime_get();
80 bool result32,
bool round_up,
83 bool mul_ratio = const_hz &&
84 (to_hz > from_hz) && ((to_hz % from_hz) == 0U);
85 bool div_ratio = const_hz &&
86 (from_hz > to_hz) && ((from_hz % to_hz) == 0U);
88 if (from_hz == to_hz) {
95 uint32_t rdivisor = div_ratio ? (from_hz / to_hz) : from_hz;
112 if (result32 && (
t <
BIT64(32))) {
113 return ((
uint32_t)
t) / (from_hz / to_hz);
117 }
else if (mul_ratio) {
119 return ((
uint32_t)
t) * (to_hz / from_hz);
127 return (
t * to_hz +
off) / from_hz;
201#define Z_HZ_us 1000000
202#define Z_HZ_ns 1000000000
203#define Z_HZ_cyc sys_clock_hw_cycles_per_sec()
204#define Z_HZ_ticks CONFIG_SYS_CLOCK_TICKS_PER_SEC
205#define Z_CCYC (!IS_ENABLED(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME))
218 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
true,
false,
false);
232 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
false,
false,
false);
246 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
true,
false,
true);
260 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
false,
false,
true);
274 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
true,
true,
false);
288 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_cyc, Z_CCYC,
false,
true,
false);
302 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
true,
false,
false);
316 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
false,
false,
false);
330 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
true,
false,
true);
344 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
false,
false,
true);
358 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
true,
true,
false);
372 return z_tmcvt(
t, Z_HZ_ms, Z_HZ_ticks,
true,
false,
true,
false);
386 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
true,
false,
false);
400 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
false,
false,
false);
414 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
true,
false,
true);
428 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
false,
false,
true);
442 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
true,
true,
false);
456 return z_tmcvt(
t, Z_HZ_us, Z_HZ_cyc, Z_CCYC,
false,
true,
false);
470 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
true,
false,
false);
484 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
false,
false,
false);
498 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
true,
false,
true);
512 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
false,
false,
true);
526 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
true,
true,
false);
540 return z_tmcvt(
t, Z_HZ_us, Z_HZ_ticks,
true,
false,
true,
false);
554 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
true,
false,
false);
568 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
false,
false,
false);
582 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
true,
false,
true);
596 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
false,
false,
true);
610 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
true,
true,
false);
624 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_cyc, Z_CCYC,
false,
true,
false);
638 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
true,
false,
false);
652 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
false,
false,
false);
666 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
true,
false,
true);
680 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
false,
false,
true);
694 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
true,
true,
false);
708 return z_tmcvt(
t, Z_HZ_ns, Z_HZ_ticks,
true,
false,
true,
false);
722 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
true,
false,
false);
736 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
false,
false,
false);
750 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
true,
false,
true);
764 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
false,
false,
true);
778 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
true,
true,
false);
792 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ms, Z_CCYC,
false,
true,
false);
806 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
true,
false,
false);
820 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
false,
false,
false);
834 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
true,
false,
true);
848 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
false,
false,
true);
862 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
true,
true,
false);
876 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_us, Z_CCYC,
false,
true,
false);
890 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
true,
false,
false);
904 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
false,
false,
false);
918 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
true,
false,
true);
932 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
false,
false,
true);
946 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
true,
true,
false);
960 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ns, Z_CCYC,
false,
true,
false);
974 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
true,
false,
false);
988 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
false,
false,
false);
1002 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
true,
false,
true);
1016 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
false,
false,
true);
1030 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
true,
true,
false);
1044 return z_tmcvt(
t, Z_HZ_cyc, Z_HZ_ticks, Z_CCYC,
false,
true,
false);
1058 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
true,
false,
false);
1072 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
false,
false,
false);
1086 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
true,
false,
true);
1100 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
false,
false,
true);
1114 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
true,
true,
false);
1128 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ms,
true,
false,
true,
false);
1142 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
true,
false,
false);
1156 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
false,
false,
false);
1170 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
true,
false,
true);
1184 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
false,
false,
true);
1198 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
true,
true,
false);
1212 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_us,
true,
false,
true,
false);
1226 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
true,
false,
false);
1240 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
false,
false,
false);
1254 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
true,
false,
true);
1268 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
false,
false,
true);
1282 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
true,
true,
false);
1296 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_ns,
true,
false,
true,
false);
1310 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
true,
false,
false);
1324 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
false,
false,
false);
1338 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
true,
false,
true);
1352 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
false,
false,
true);
1366 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
true,
true,
false);
1380 return z_tmcvt(
t, Z_HZ_ticks, Z_HZ_cyc, Z_CCYC,
false,
true,
false);
1383#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
1384#include <syscalls/time_units.h>
1387#undef TIME_CONSTEXPR
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa off
Definition: asm-macro-32-bit-gnu.h:17
#define ALWAYS_INLINE
Definition: common.h:116
#define BIT64(_n)
64-bit unsigned integer with bit position _n set.
Definition: util_macro.h:49
struct k_thread t
Definition: kobject.c:1316
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
static uint32_t k_ms_to_cyc_floor32(uint32_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:215
static uint64_t k_cyc_to_ns_near64(uint64_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:929
static uint64_t k_ticks_to_ns_floor64(uint64_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1237
static uint64_t k_ms_to_cyc_near64(uint64_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:257
static uint64_t k_ms_to_cyc_ceil64(uint64_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:285
static uint32_t k_ticks_to_ms_near32(uint32_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1083
static uint32_t k_ns_to_cyc_floor32(uint32_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:551
static uint32_t k_ticks_to_ns_near32(uint32_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1251
static uint32_t k_us_to_ticks_near32(uint32_t t)
Convert microseconds to ticks.
Definition: time_units.h:495
static uint32_t k_ns_to_ticks_floor32(uint32_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:635
static uint64_t k_ns_to_ticks_ceil64(uint64_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:705
static uint64_t k_cyc_to_ticks_floor64(uint64_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:985
static int sys_clock_hw_cycles_per_sec(void)
Definition: time_units.h:50
static uint64_t k_ticks_to_ns_near64(uint64_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1265
static uint64_t k_cyc_to_ms_floor64(uint64_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:733
static uint64_t k_us_to_cyc_ceil64(uint64_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:453
static uint64_t k_ns_to_cyc_floor64(uint64_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:565
static uint64_t k_us_to_ticks_floor64(uint64_t t)
Convert microseconds to ticks.
Definition: time_units.h:481
static uint32_t k_cyc_to_us_ceil32(uint32_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:859
static uint32_t k_cyc_to_ns_floor32(uint32_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:887
static uint64_t k_ms_to_ticks_floor64(uint64_t t)
Convert milliseconds to ticks.
Definition: time_units.h:313
static uint64_t k_cyc_to_ms_ceil64(uint64_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:789
static uint32_t k_us_to_cyc_ceil32(uint32_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:439
#define TIME_CONSTEXPR
Definition: time_units.h:47
static uint32_t k_ticks_to_ms_ceil32(uint32_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1111
static uint32_t k_ticks_to_cyc_floor32(uint32_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1307
static uint64_t k_ticks_to_cyc_ceil64(uint64_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1377
static uint32_t k_us_to_ticks_floor32(uint32_t t)
Convert microseconds to ticks.
Definition: time_units.h:467
static uint32_t k_ns_to_ticks_near32(uint32_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:663
static uint64_t k_ns_to_ticks_floor64(uint64_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:649
static uint64_t k_ms_to_ticks_near64(uint64_t t)
Convert milliseconds to ticks.
Definition: time_units.h:341
static uint32_t k_ticks_to_ns_ceil32(uint32_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1279
static uint64_t k_us_to_cyc_near64(uint64_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:425
static uint32_t k_ns_to_cyc_near32(uint32_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:579
static uint64_t k_us_to_cyc_floor64(uint64_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:397
static uint32_t k_ticks_to_ns_floor32(uint32_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1223
static uint64_t k_cyc_to_ms_near64(uint64_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:761
static uint32_t k_us_to_cyc_near32(uint32_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:411
static uint64_t k_ticks_to_ms_floor64(uint64_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1069
static uint32_t k_ns_to_ticks_ceil32(uint32_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:691
static uint32_t k_cyc_to_ms_near32(uint32_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:747
static uint32_t k_cyc_to_ms_ceil32(uint32_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:775
static uint64_t k_ns_to_ticks_near64(uint64_t t)
Convert nanoseconds to ticks.
Definition: time_units.h:677
static uint64_t k_ticks_to_us_near64(uint64_t t)
Convert ticks to microseconds.
Definition: time_units.h:1181
static uint32_t k_cyc_to_ticks_ceil32(uint32_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:1027
static uint64_t k_ns_to_cyc_ceil64(uint64_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:621
static uint32_t k_ms_to_cyc_ceil32(uint32_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:271
static uint32_t k_ticks_to_ms_floor32(uint32_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1055
static uint32_t k_ms_to_ticks_floor32(uint32_t t)
Convert milliseconds to ticks.
Definition: time_units.h:299
static uint64_t k_cyc_to_ticks_near64(uint64_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:1013
static uint64_t k_ticks_to_us_floor64(uint64_t t)
Convert ticks to microseconds.
Definition: time_units.h:1153
static uint64_t k_cyc_to_ns_floor64(uint64_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:901
static uint32_t k_cyc_to_ns_ceil32(uint32_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:943
static uint32_t k_cyc_to_us_floor32(uint32_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:803
static uint64_t k_cyc_to_us_floor64(uint64_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:817
static uint32_t k_us_to_cyc_floor32(uint32_t t)
Convert microseconds to hardware cycles.
Definition: time_units.h:383
static uint64_t k_ms_to_ticks_ceil64(uint64_t t)
Convert milliseconds to ticks.
Definition: time_units.h:369
static uint32_t k_us_to_ticks_ceil32(uint32_t t)
Convert microseconds to ticks.
Definition: time_units.h:523
static uint32_t k_ticks_to_us_near32(uint32_t t)
Convert ticks to microseconds.
Definition: time_units.h:1167
static uint32_t k_cyc_to_ticks_floor32(uint32_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:971
static uint32_t k_ticks_to_us_ceil32(uint32_t t)
Convert ticks to microseconds.
Definition: time_units.h:1195
static uint32_t k_ms_to_ticks_near32(uint32_t t)
Convert milliseconds to ticks.
Definition: time_units.h:327
static uint64_t k_cyc_to_ns_ceil64(uint64_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:957
static uint32_t k_ns_to_cyc_ceil32(uint32_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:607
static uint32_t k_ticks_to_cyc_ceil32(uint32_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1363
static uint64_t k_cyc_to_us_ceil64(uint64_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:873
static uint32_t k_ms_to_cyc_near32(uint32_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:243
static uint32_t k_ticks_to_us_floor32(uint32_t t)
Convert ticks to microseconds.
Definition: time_units.h:1139
static uint32_t k_cyc_to_ms_floor32(uint32_t t)
Convert hardware cycles to milliseconds.
Definition: time_units.h:719
static uint64_t k_ticks_to_ms_near64(uint64_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1097
static uint64_t k_ticks_to_us_ceil64(uint64_t t)
Convert ticks to microseconds.
Definition: time_units.h:1209
static uint64_t k_us_to_ticks_near64(uint64_t t)
Convert microseconds to ticks.
Definition: time_units.h:509
static uint32_t k_cyc_to_ns_near32(uint32_t t)
Convert hardware cycles to nanoseconds.
Definition: time_units.h:915
static uint32_t k_ticks_to_cyc_near32(uint32_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1335
static uint64_t k_cyc_to_ticks_ceil64(uint64_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:1041
static uint32_t k_ms_to_ticks_ceil32(uint32_t t)
Convert milliseconds to ticks.
Definition: time_units.h:355
static uint64_t k_ticks_to_ms_ceil64(uint64_t t)
Convert ticks to milliseconds.
Definition: time_units.h:1125
static uint64_t k_ticks_to_cyc_floor64(uint64_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1321
static uint64_t k_cyc_to_us_near64(uint64_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:845
static uint64_t k_ticks_to_cyc_near64(uint64_t t)
Convert ticks to hardware cycles.
Definition: time_units.h:1349
static uint64_t k_ms_to_cyc_floor64(uint64_t t)
Convert milliseconds to hardware cycles.
Definition: time_units.h:229
static uint64_t k_ticks_to_ns_ceil64(uint64_t t)
Convert ticks to nanoseconds.
Definition: time_units.h:1293
static uint32_t k_cyc_to_ticks_near32(uint32_t t)
Convert hardware cycles to ticks.
Definition: time_units.h:999
static uint64_t k_ns_to_cyc_near64(uint64_t t)
Convert nanoseconds to hardware cycles.
Definition: time_units.h:593
static uint64_t k_us_to_ticks_ceil64(uint64_t t)
Convert microseconds to ticks.
Definition: time_units.h:537
static uint32_t k_cyc_to_us_near32(uint32_t t)
Convert hardware cycles to microseconds.
Definition: time_units.h:831
#define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
Definition: ztest.h:40