- return
- avahi_timeval_compare(&now, &e->expiry) >= 0 && /* Time elapsed */
- avahi_timeval_compare(&now, &e->last_run) != 0; /* Not yet run */
-}
-
-static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer user_data) {
- AvahiTimeEventQueue *q = (AvahiTimeEventQueue*) source;
- struct timeval now;
-
- g_assert(source);
-
- source_get_timeval(source, &now);
-
- while (q->prioq->root) {
- AvahiTimeEvent *e = q->prioq->root->data;
-
- /* Not yet expired */
- if (avahi_timeval_compare(&now, &e->expiry) < 0)
- break;