diff --git a/repos/dde_linux/src/include/lx_emul/impl/timer.h b/repos/dde_linux/src/include/lx_emul/impl/timer.h index 6ad73bcae1..153523a71c 100644 --- a/repos/dde_linux/src/include/lx_emul/impl/timer.h +++ b/repos/dde_linux/src/include/lx_emul/impl/timer.h @@ -61,6 +61,12 @@ int hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, { unsigned long expires = tim.tv64 / (NSEC_PER_MSEC * HZ); + /* + * Prevent truncation through rounding the values by adding 1 jiffy + * in this case. + */ + expires += (expires == jiffies); + if (!Lx::timer().find(timer)) Lx::timer().add(timer, Lx::Timer::HR);