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:
parent
bd09c82521
commit
1ed49f92dd
3 changed files with 133 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue