]> arthur.barton.de Git - netatalk.git/blobdiff - libevent/test/bench_cascade.c
Fix typo
[netatalk.git] / libevent / test / bench_cascade.c
index 6b508ef13aba5ca88c8aa5df859ffa6f722bf8fb..08b7f945135c9409ea0c315d650013a9c8584d24 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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>
@@ -41,7 +44,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#ifdef _EVENT_HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <errno.h>
 
 #include <event.h>
@@ -92,7 +97,7 @@ run_once(int num_pipes)
        }
 
        /* measurements includes event setup */
-       gettimeofday(&ts, NULL);
+       evutil_gettimeofday(&ts, NULL);
 
        /* provide a default timeout for events */
        evutil_timerclear(&tv_timeout);
@@ -111,7 +116,7 @@ run_once(int num_pipes)
 
        event_dispatch();
 
-       gettimeofday(&te, NULL);
+       evutil_gettimeofday(&te, NULL);
        evutil_timersub(&te, &ts, &te);
 
        for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {