#include "utils.h"
#include "xalloc.h"
-event_loop_t *loop;
-struct timeval now;
-
static int io_compare(const io_t *a, const io_t *b) {
return a->fd - b->fd;
}
while(loop->running) {
gettimeofday(&loop->now, NULL);
- now = loop->now;
struct timeval diff, *tv = NULL;
while(loop->timeouts.head) {
loop->signals.compare = (splay_compare_t)signal_compare;
loop->pipefd[0] = -1;
loop->pipefd[1] = -1;
+ gettimeofday(&loop->now, NULL);
}
void event_loop_exit(event_loop_t *loop) {