kernel/sys_clock.h: Deprecate and convert uses of old conversions
Mark the old time conversion APIs deprecated, leave compatibility macros in place, and replace all usage with the new API. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
f2b75fd644
commit
8892406c1d
53 changed files with 122 additions and 114 deletions
|
@ -1637,7 +1637,7 @@ __syscall u32_t k_timer_remaining_get(struct k_timer *timer);
|
|||
static inline u32_t z_impl_k_timer_remaining_get(struct k_timer *timer)
|
||||
{
|
||||
const s32_t ticks = z_timeout_remaining(&timer->timeout);
|
||||
return (ticks > 0) ? (u32_t)__ticks_to_ms(ticks) : 0U;
|
||||
return (ticks > 0) ? (u32_t)k_ticks_to_ms_floor64(ticks) : 0U;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3077,7 +3077,7 @@ static inline int k_delayed_work_submit(struct k_delayed_work *work,
|
|||
*/
|
||||
static inline s32_t k_delayed_work_remaining_get(struct k_delayed_work *work)
|
||||
{
|
||||
return __ticks_to_ms(z_timeout_remaining(&work->timeout));
|
||||
return k_ticks_to_ms_floor64(z_timeout_remaining(&work->timeout));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue