mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-23 00:39:51 +00:00
added embedded_get_time_ms(void)
This commit is contained in:
parent
5bb5bc3ed8
commit
8304b81b86
@ -108,6 +108,8 @@ void run_loop_execute(void);
|
||||
uint32_t embedded_ticks_for_ms(uint32_t time_in_ms);
|
||||
// Queries the current time in ticks.
|
||||
uint32_t embedded_get_ticks(void);
|
||||
// Queries the current time in ms
|
||||
uint32_t embedded_get_time_ms(void);
|
||||
// Allows to update BTstack system ticks based on another already existing clock
|
||||
void embedded_set_ticks(uint32_t ticks);
|
||||
#endif
|
||||
|
@ -204,6 +204,11 @@ void embedded_set_ticks(uint32_t ticks){
|
||||
uint32_t embedded_ticks_for_ms(uint32_t time_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
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user