mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
added HAVE_TIME checks
This commit is contained in:
parent
71341fcdeb
commit
83a9c1a5f4
@ -72,6 +72,7 @@ int embedded_remove_data_source(data_source_t *ds){
|
||||
* Add timer to run_loop (keep list sorted)
|
||||
*/
|
||||
void embedded_add_timer(timer_source_t *ts){
|
||||
#ifdef HAVE_TIME
|
||||
linked_item_t *it;
|
||||
for (it = (linked_item_t *) &timers; it->next ; it = it->next){
|
||||
if (run_loop_timer_compare( (timer_source_t *) it->next, ts) >= 0) {
|
||||
@ -82,14 +83,17 @@ void embedded_add_timer(timer_source_t *ts){
|
||||
it->next = (linked_item_t *) ts;
|
||||
// log_dbg("Added timer %x at %u\n", (int) ts, (unsigned int) ts->timeout.tv_sec);
|
||||
// embedded_dump_timer();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove timer from run loop
|
||||
*/
|
||||
int embedded_remove_timer(timer_source_t *ts){
|
||||
#ifdef HAVE_TIME
|
||||
// log_dbg("Removed timer %x at %u\n", (int) ts, (unsigned int) ts->timeout.tv_sec);
|
||||
return linked_list_remove(&timers, (linked_item_t *) ts);
|
||||
#endif
|
||||
}
|
||||
|
||||
void embedded_dump_timer(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user