summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt7
-rw-r--r--src/common/wall_clock.cpp2
-rw-r--r--src/common/wall_clock.h2
-rw-r--r--src/common/x64/native_clock.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 5d54516eb..0fb5d9708 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -192,4 +192,9 @@ create_target_directory_groups(common)
192find_package(Boost 1.71 COMPONENTS context headers REQUIRED) 192find_package(Boost 1.71 COMPONENTS context headers REQUIRED)
193 193
194target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile) 194target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile)
195target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd xbyak) 195target_link_libraries(common PRIVATE lz4::lz4 xbyak)
196if (MSVC)
197 target_link_libraries(common PRIVATE zstd::zstd)
198else()
199 target_link_libraries(common PRIVATE zstd)
200endif()
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index 3afbdb898..7a20e95b7 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -15,7 +15,7 @@ namespace Common {
15using base_timer = std::chrono::steady_clock; 15using base_timer = std::chrono::steady_clock;
16using base_time_point = std::chrono::time_point<base_timer>; 16using base_time_point = std::chrono::time_point<base_timer>;
17 17
18class StandardWallClock : public WallClock { 18class StandardWallClock final : public WallClock {
19public: 19public:
20 StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency) 20 StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency)
21 : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) { 21 : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) {
diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h
index 5db30083d..bc7adfbf8 100644
--- a/src/common/wall_clock.h
+++ b/src/common/wall_clock.h
@@ -13,6 +13,8 @@ namespace Common {
13 13
14class WallClock { 14class WallClock {
15public: 15public:
16 virtual ~WallClock() = default;
17
16 /// Returns current wall time in nanoseconds 18 /// Returns current wall time in nanoseconds
17 [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0; 19 [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0;
18 20
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h
index 891a3bbfd..7c503df26 100644
--- a/src/common/x64/native_clock.h
+++ b/src/common/x64/native_clock.h
@@ -12,7 +12,7 @@
12namespace Common { 12namespace Common {
13 13
14namespace X64 { 14namespace X64 {
15class NativeClock : public WallClock { 15class NativeClock final : public WallClock {
16public: 16public:
17 NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency); 17 NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency);
18 18