X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=timeeventq.c;fp=timeeventq.c;h=0d4af97385356a1d4c39d08536c1d79708a115ff;hb=c18626ad35cdf94edbff196070ccbb6ae825abd0;hp=b3dd897f38d2db9200b8a46892773cf8b23d1794;hpb=54247ce93dc6f048c0ffea546f454653ce0e25a8;p=catta diff --git a/timeeventq.c b/timeeventq.c index b3dd897..0d4af97 100644 --- a/timeeventq.c +++ b/timeeventq.c @@ -133,7 +133,7 @@ void flx_time_event_queue_remove(flxTimeEventQueue *q, flxTimeEvent *e) { g_free(e); } -void flx_time_event_update(flxTimeEventQueue *q, flxTimeEvent *e, const GTimeVal *timeval) { +void flx_time_event_queue_update(flxTimeEventQueue *q, flxTimeEvent *e, const GTimeVal *timeval) { g_assert(q); g_assert(e); g_assert(e->queue == q); @@ -142,3 +142,15 @@ void flx_time_event_update(flxTimeEventQueue *q, flxTimeEvent *e, const GTimeVal flx_prio_queue_shuffle(q->prioq, e->node); } + +flxTimeEvent* flx_time_event_queue_root(flxTimeEventQueue *q) { + g_assert(q); + + return q->prioq->root ? q->prioq->root->data : NULL; +} + +flxTimeEvent* flx_time_event_next(flxTimeEvent *e) { + g_assert(e); + + return e->node->next->data; +}