unified: have __ticks_to_ms() return 0 when no system clock
Change-Id: I0834dfff2a631ef365be7ae3a55d5ad4ace3dbf5 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
35497d6c5e
commit
57d55dcc7a
1 changed files with 5 additions and 0 deletions
|
@ -240,7 +240,12 @@ extern void *k_thread_custom_data_get(void);
|
||||||
|
|
||||||
static int64_t __ticks_to_ms(int64_t ticks)
|
static int64_t __ticks_to_ms(int64_t ticks)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_SYS_CLOCK_EXISTS
|
||||||
return (MSEC_PER_SEC * (uint64_t)ticks) / sys_clock_ticks_per_sec;
|
return (MSEC_PER_SEC * (uint64_t)ticks) / sys_clock_ticks_per_sec;
|
||||||
|
#else
|
||||||
|
__ASSERT(ticks == 0, "");
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue