kernel: timeout: Reduce number of sys_clock_elapsed calls
sys_clock_elapsed requires access to system clock register interface
which is often slow. When new relative timeout is added sys_clock_elapsed()
is called once to calculate delta ticks and then if that triggers setting
new timeout sys_clock_elapsed() is called again. This call is redundant
since everything happens under spin lock so it is better to reuse value
returned by the first call.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
pull/88172/head
Krzysztof Chruściński3 months agocommitted byBenjamin Cabé