From 4e074a6d5272bd99536cd12a1ff6afdc6ece2890 Mon Sep 17 00:00:00 2001 From: James Park Date: Thu, 26 Nov 2020 19:42:54 -0800 Subject: [PATCH] vulkan: Portable wsi_common_get_current_time() Use os_time_get_nano(), which has a Windows implementation. Reviewed-by: Samuel Pitoiset Part-of: --- src/vulkan/wsi/wsi_common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 309f2fa99d5..c1c4f718bd3 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -24,11 +24,11 @@ #include "wsi_common_private.h" #include "util/macros.h" #include "util/os_file.h" +#include "util/os_time.h" #include "util/xmlconfig.h" #include "vk_util.h" #include -#include #include #include @@ -671,7 +671,5 @@ wsi_common_queue_present(const struct wsi_device *wsi, uint64_t wsi_common_get_current_time(void) { - struct timespec current; - clock_gettime(CLOCK_MONOTONIC, ¤t); - return current.tv_nsec + current.tv_sec * 1000000000ull; + return os_time_get_nano(); }