*/
#include "event2/event-config.h"
+#include "../util-internal.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <event.h>
#include <evutil.h>
-static int count, writes, fired, failures;
+static ev_ssize_t count, fired;
+static int writes, failures;
static evutil_socket_t *pipes;
static int num_pipes, num_active, num_writes;
static struct event *events;
count = 0;
writes = num_writes;
- { int xcount = 0;
- evutil_gettimeofday(&ts, NULL);
- do {
- event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
- xcount++;
- } while (count != fired);
- evutil_gettimeofday(&te, NULL);
-
- if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count);
+ {
+ int xcount = 0;
+ evutil_gettimeofday(&ts, NULL);
+ do {
+ event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
+ xcount++;
+ } while (count != fired);
+ evutil_gettimeofday(&te, NULL);
+
+ if (xcount != count)
+ fprintf(stderr, "Xcount: %d, Rcount: " EV_SSIZE_FMT "\n",
+ xcount, count);
}
evutil_timersub(&te, &ts, &te);