From 9610e29a657d182b05c4013370a3ef4a2d142619 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 21 Aug 2022 20:20:25 +0000 Subject: [PATCH] [util] Implement get_frequency + get_counter on non-Windows platforms --- src/util/util_time.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util/util_time.h b/src/util/util_time.h index ee9b7d6fc..625b2b508 100644 --- a/src/util/util_time.h +++ b/src/util/util_time.h @@ -44,7 +44,15 @@ namespace dxvk { } }; #else - using high_resolution_clock = std::chrono::high_resolution_clock; + struct high_resolution_clock : public std::chrono::high_resolution_clock { + static inline int64_t get_frequency() { + return period::den; + } + + static inline int64_t get_counter() { + return dxvk::high_resolution_clock::now().time_since_epoch().count(); + } + }; #endif } \ No newline at end of file