make embedded_get_time_ms and posix_get_time_ms private. (use run_loop_get_time_ms instead)

This commit is contained in:
Matthias Ringwald 2015-06-16 23:37:11 +02:00
parent 28efbf5f7d
commit ada022b7e8
2 changed files with 8 additions and 7 deletions

View File

@ -256,7 +256,7 @@ static void posix_init(void){
/**
* @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;
gettimeofday(&current_tv, NULL);
return (current_tv.tv_sec - init_tv.tv_sec) * 1000

View File

@ -225,17 +225,18 @@ 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
static uint32_t embedded_get_time_ms(void){
#ifdef HAVE_TIME_MS
uint32_t embedded_get_time_ms(void){
return hal_time_ms();
}
#endif
#ifdef HAVE_TICK
return system_ticks * hal_tick_get_tick_period_in_ms();
#endif
return 0;
}
/**
* trigger run loop iteration