native: added posix_get_hw_cycle()
Added function (for all ARCH_POSIX boards) to get the the current clock cycle of the CPU Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
bb72c3d020
commit
a99a14c3b7
2 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,7 @@ extern "C" {
|
|||
|
||||
void posix_irq_handler(void);
|
||||
void posix_exit(int exit_code);
|
||||
u64_t posix_get_hw_cycle(void);
|
||||
|
||||
#if defined(CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT)
|
||||
void k_busy_wait(u32_t usec_to_wait);
|
||||
|
|
|
@ -167,6 +167,10 @@ u64_t hwm_get_time(void)
|
|||
return device_time;
|
||||
}
|
||||
|
||||
u64_t posix_get_hw_cycle(void)
|
||||
{
|
||||
return hwm_get_time();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to initialize the HW models
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue