if ((r = b->tv_sec - a->tv_sec)) return r;
return b->tv_usec - a->tv_usec;
-
+
}
static void insert_timer(ObMainLoop *loop, ObMainLoopTimer *ins)
for (it = loop->timers; it; it = next) {
ObMainLoopTimer *curr;
-
+
next = g_slist_next(it);
curr = it->data;
*/
if (curr->del_me) {
/* delete the top */
- loop->timers = g_slist_delete_link(loop->timers, it);
+ loop->timers = g_slist_delete_link(loop->timers, it);
if (curr->destroy)
curr->destroy(curr->data);
g_free(curr);
continue;
}
- /* the queue is sorted, so if this timer shouldn't fire, none are
+ /* the queue is sorted, so if this timer shouldn't fire, none are
ready */
if (timecompare(&NEAREST_TIMEOUT(loop), &loop->now) < 0)
break;