mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-22 15:40:16 +00:00
make embedded_get_time_ms and posix_get_time_ms private. (use run_loop_get_time_ms instead)
This commit is contained in:
parent
28efbf5f7d
commit
ada022b7e8
@ -256,7 +256,7 @@ static void posix_init(void){
|
|||||||
/**
|
/**
|
||||||
* @brief Queries the current time in ms since start
|
* @brief Queries the current time in ms since start
|
||||||
*/
|
*/
|
||||||
uint32_t posix_get_time_ms(void){
|
static uint32_t posix_get_time_ms(void){
|
||||||
struct timeval current_tv;
|
struct timeval current_tv;
|
||||||
gettimeofday(¤t_tv, NULL);
|
gettimeofday(¤t_tv, NULL);
|
||||||
return (current_tv.tv_sec - init_tv.tv_sec) * 1000
|
return (current_tv.tv_sec - init_tv.tv_sec) * 1000
|
||||||
|
@ -225,17 +225,18 @@ void embedded_set_ticks(uint32_t ticks){
|
|||||||
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms){
|
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms){
|
||||||
return time_in_ms / hal_tick_get_tick_period_in_ms();
|
return time_in_ms / hal_tick_get_tick_period_in_ms();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t embedded_get_time_ms(void){
|
|
||||||
return system_ticks * hal_tick_get_tick_period_in_ms();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static uint32_t embedded_get_time_ms(void){
|
||||||
#ifdef HAVE_TIME_MS
|
#ifdef HAVE_TIME_MS
|
||||||
uint32_t embedded_get_time_ms(void){
|
|
||||||
return hal_time_ms();
|
return hal_time_ms();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_TICK
|
||||||
|
return system_ticks * hal_tick_get_tick_period_in_ms();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* trigger run loop iteration
|
* trigger run loop iteration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user