/*
* Copyright 2003-2007 Niels Provos <provos@citi.umich.edu>
- * Copyright 2007-2010 Niels Provos and Nick Mathewson
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef _EVENT_HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
#include <event.h>
count = 0;
writes = num_writes;
{ int xcount = 0;
- gettimeofday(&ts, NULL);
+ evutil_gettimeofday(&ts, NULL);
do {
event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
xcount++;
} while (count != fired);
- gettimeofday(&te, NULL);
+ evutil_gettimeofday(&te, NULL);
if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count);
}