- Timestamp:
- Dec 11, 2008, 4:01:15 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- ca1fc33a
- Parents:
- 25cccdc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
select.c
rb7bb454 r86bf047 44 44 while(!g_sequence_iter_is_end(it)) { 45 45 owl_timer *t = g_sequence_get(it); 46 int remove = 0; 46 void (*cb)(struct _owl_timer *, void *); 47 void *data; 47 48 48 49 if(t->time > now) 49 50 break; 50 51 52 cb = t->callback; 53 data = t->data; 54 51 55 /* Reschedule if appropriate */ 52 56 if(t->interval > 0) { 53 54 57 t->time = now + t->interval; 58 g_sequence_sort_changed(it, (GCompareDataFunc)_owl_select_timer_cmp, NULL); 55 59 } else { 56 g_sequence_remove(it);57 remove = 1;60 owl_select_remove_timer(t); 61 t = NULL; 58 62 } 59 63 60 64 /* Do the callback */ 61 t->callback(t, t->data); 62 63 if (remove) { 64 owl_free(t); 65 } 65 cb(t, data); 66 66 67 it = g_sequence_get_begin_iter(owl_global_get_timerlist(&g)); 67 68 }
Note: See TracChangeset
for help on using the changeset viewer.