Mesa (master): util: use clock_gettime() on PIPE_OS_BSD
Emil Velikov
evelikov at kemper.freedesktop.org
Thu Mar 1 18:49:37 UTC 2018
Module: Mesa
Branch: master
Commit: 7bea40e56652a1ded4374d92fb340b454fbac475
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7bea40e56652a1ded4374d92fb340b454fbac475
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Wed Feb 28 21:19:19 2018 +1100
util: use clock_gettime() on PIPE_OS_BSD
OpenBSD, FreeBSD, NetBSD and DragonFlyBSD all have clock_gettime()
so use it when PIPE_OS_BSD is defined.
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/util/os_time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/os_time.c b/src/util/os_time.c
index 72dc7e49c0..ac488b2287 100644
--- a/src/util/os_time.c
+++ b/src/util/os_time.c
@@ -55,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);
More information about the mesa-commit
mailing list