#define U_TIME_H_
-#ifndef WIN32
+#include "pipe/p_config.h"
+
+#if defined(PIPE_OS_LINUX)
#include <time.h> /* timeval */
#include <unistd.h> /* usleep */
#endif
*/
struct util_time
{
-#ifndef WIN32
+#if defined(PIPE_OS_LINUX)
struct timeval tv;
#else
- long long counter;
+ int64_t counter;
#endif
};
const struct util_time *t2);
/**
- * Returns zero when the timeout expires, non zero otherwise.
+ * Returns non-zero when the timeout expires.
*/
-int
+boolean
util_time_timeout(const struct util_time *start,
const struct util_time *end,
const struct util_time *curr);
-#ifndef WIN32
+#if defined(PIPE_OS_LINUX)
#define util_time_sleep usleep
#else
-int
+void
util_time_sleep(unsigned usecs);
#endif