TimerResBenchmark is a executable benchmark to micro-adjusting timer resolution for higher precision. This tool identifies the most accurate timer resolution, striving to achieve the shortest possible delay intervals close to 1 millisecond. Achieving this level of precision is beneficial for the overall performance of the system.
- The tool also include TimerResolution & MeasureSleep from Amittxv's TimerRes.
- Before we start, ensure to disable HPET & use Idle disabled power plan.
- Grab the latest version at GitHub Releases.
- Extract the
.7z
archive. - Run
TimerBenchmark.exe
as an administrator(Adjust settings inappsettings.json
as needed). - It will generate a
result.txt
file in the same directory upon completion.
To visualize the results:
- Visit Plotly Chart Studio.
- Click "Import" at the top right and upload the
result.txt
file. - Click "+ Trace" at the top left and adjust the settings as shown in the image below:
- The graph should work, and this time we finally can find that sweet timer resolution.
- Look for the lowest Sleep(1) Delta on the y-axis. This represents the most precise and constant 1ms Sleep delays. Remember, this value varies greatly between PC specs. Based on my lowest lowest Sleep(1) Delta, the optimal resolution for me is 0.5024ms
- Go back to the directory where
TimerBenchmark.exe
is located. - Create a shortcut for
SetTimerResolution.exe
. - Place the shortcut in
shell:startup
with the following target:
C:\PATH\TO\SetTimerResolution.exe --no-console --resolution 5000
- Replace
5000
with your optimal timer resolution. - Restart your PC & verify everything is working correctly with
MeasureSleep.exe
.
- Open CMD with administrator privileges and execute the following commands:
bcdedit /deletevalue useplatformclock
bcdedit /set disabledynamictick yes
- On Windows Server 2022+ and Windows 11+, apply the following registry change:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel]
"GlobalTimerResolutionRequests"=dword:00000001
- Verify the HPET status using TimerBench
- You can either configure it manually or download the power plan
- Open CMD & type this command:
powercfg -import C:\PATH\TO\MUREN.POW
- Change your power plan setting to Muren power plan.
- The purpose of this is to disable HPET and utilize more stable and consistent timers, such as TSC at 3.32MHz, which can improve gaming performance, particularly in terms of frame rate consistency and latency. The benchmark allows you to find the perfect adjustment of timer resolution based on benchmark results, which can further enhance these benefits.
- The original benchmark required execution via Command Prompt or PowerShell, which may not be user-friendly for all users. Therefore, TimerResBenchmark provides an executable version that is easy to run and written in C# for efficiency.
- This project was created as a learning endeavor to explore the C# language further. Contributions and insights are welcome to help improve the tool and the author's understanding of C#. :)