+ /*
+ * Make all events appear expired by substracting the difference between
+ * the expiration time of the last event and the current time.
+ */
+
+ if(!event_tree->tail) {
+ return;
+ }
+
+ event = event_tree->tail->data;
+
+ if(event->time <= now) {
+ return;
+ }
+
+ diff = event->time - now;
+
+ for(node = event_tree->head; node; node = node->next) {
+ event = node->data;
+ event->time -= diff;
+ }