posix: enumerate timers in in btstack_run_loop_posix_dump_timer

This commit is contained in:
Matthias Ringwald 2020-11-16 21:19:05 +01:00
parent 7ab974d945
commit cb5a7fc3c5

View File

@ -124,10 +124,10 @@ static bool btstack_run_loop_posix_remove_timer(btstack_timer_source_t *ts){
static void btstack_run_loop_posix_dump_timer(void){ static void btstack_run_loop_posix_dump_timer(void){
#ifdef ENABLE_LOG_INFO #ifdef ENABLE_LOG_INFO
btstack_linked_item_t *it; btstack_linked_item_t *it;
int i = 0; int i = 1;
for (it = (btstack_linked_item_t *) timers; it ; it = it->next){ for (it = (btstack_linked_item_t *) timers; it ; it = it->next){
btstack_timer_source_t *ts = (btstack_timer_source_t*) it; btstack_timer_source_t *ts = (btstack_timer_source_t*) it;
log_info("timer %u (%p): timeout %u\n", i, ts, ts->timeout); log_info("timer %u (%p): timeout %u\n", i++, ts, ts->timeout);
} }
#endif #endif
} }