swr/rast: Add support for generalized late and early z/stencil stats
[mesa.git] / src / util / os_time.c
index 8d8291ff17316e6611f54595d626db580f08e585..ac488b2287cb63b7c6c0dd62cc5c4027c15d23a4 100644 (file)
@@ -40,6 +40,7 @@
 #include "util/u_atomic.h"
 
 #if defined(PIPE_OS_UNIX)
+#  include <unistd.h> /* usleep */
 #  include <time.h> /* timeval */
 #  include <sys/time.h> /* timeval */
 #  include <sched.h> /* sched_yield */
@@ -54,7 +55,7 @@
 int64_t
 os_time_get_nano(void)
 {
-#if defined(PIPE_OS_LINUX)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD)
 
    struct timespec tv;
    clock_gettime(CLOCK_MONOTONIC, &tv);