If CYC_PER_TICK does not divide the (now - last_count) quantity exactly with integer math, the subsequent multiplication before incrementing last_count causes a drift. This commit eliminates the redundant division-followed-by-multiplication and fixes https://github.com/zephyrproject-rtos/zephyr/issues/37852 Signed-off-by: Berend Ozceri <berend@recogni.com> |
||
|---|---|---|
| .. | ||
| altera_avalon_timer_hal.c | ||
| apic_timer.c | ||
| apic_tsc.c | ||
| arcv2_timer0.c | ||
| arm_arch_timer.c | ||
| cavs_timer.c | ||
| cc13x2_cc26x2_rtc_timer.c | ||
| CMakeLists.txt | ||
| cortex_m_systick.c | ||
| esp32c3_sys_timer.c | ||
| hpet.c | ||
| ite_it8xxx2_timer.c | ||
| Kconfig | ||
| Kconfig.stm32_lptim | ||
| leon_gptimer.c | ||
| litex_timer.c | ||
| mchp_xec_rtos_timer.c | ||
| mcux_lptmr_timer.c | ||
| mcux_os_timer.c | ||
| native_posix_timer.c | ||
| npcx_itim_timer.c | ||
| nrf_rtc_timer.c | ||
| rcar_cmt_timer.c | ||
| riscv_machine_timer.c | ||
| rv32m1_lptmr_timer.c | ||
| sam0_rtc_timer.c | ||
| stm32_lptim_timer.c | ||
| sys_clock_init.c | ||
| xlnx_psttc_timer_priv.h | ||
| xlnx_psttc_timer.c | ||
| xtensa_sys_timer.c | ||