Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw-mgmt: thermal: TC fix timer for while loops based on current syste…
…m time In while loops like: end = current_milli_time() + delay while end > current_milli_time(): do_somthing() We potentially can get incorrect delay in case if during loop system time will be changed. It happens because current_milli_time() based on system time and this time can be forwarded or rewinded. To fix this issue - it needs to change current_milli_time to time which can't be changed, like: system uptime, application uptime etc. This fix changing current_milli_time() to read CLOCK_PROCESS_CPUTIME_ID (High-resolution per-process timer from the CPU) timer as reference. Bug #4042294 Signed-off-by: Oleksandr Shamray <[email protected]>
- Loading branch information