common: Implement a method to change the Windows timer resolution

This utilizes undocumented NtDll functions to change the current timer resolution from the default of 1ms.
This commit is contained in:
Morph 2023-03-01 19:27:10 -05:00
parent bd09c82521
commit 1ed49f92dd
3 changed files with 133 additions and 0 deletions

View file

@ -144,6 +144,14 @@ add_library(common STATIC
zstd_compression.h
)
if (WIN32)
target_sources(common PRIVATE
windows/timer_resolution.cpp
windows/timer_resolution.h
)
target_link_libraries(common PRIVATE ntdll)
endif()
if(ARCHITECTURE_x86_64)
target_sources(common
PRIVATE