gallium: include p_debug.h for non-HAVE_POSIX_MEMALIGN
[mesa.git] / src / gallium / auxiliary / util / u_time.h
index 32035cceb5e9126625b2e4c4ac38985f7ab0492b..f9963ce0e27b1b7647d8911fd41367205d714604 100644 (file)
@@ -36,7 +36,9 @@
 #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
@@ -56,10 +58,10 @@ extern "C" {
  */
 struct util_time 
 {
-#ifndef WIN32
+#if defined(PIPE_OS_LINUX)
    struct timeval tv;
 #else
-   long long counter;
+   int64_t counter;
 #endif
 };
    
@@ -77,17 +79,17 @@ util_time_diff(const struct util_time *t1,
                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