Hi, i need the timer resolution to be under 0.5ms...(don't ask me why)
Is it possible at all? If so, is there a program that let's you go past 0.5?
I tried reverse engineering timer resolution w ida-pro but it's a hell of headache and i think there are better ways ¯\_(ツ)_/¯
Are you programmer?
There are two functions:
NtQueryTimerResolution
and
NtSetTimerResolution
. First one returns minimum, maximum and current resolutions.
Sure you can specify (with NtSetTimerResolution) any timer resolution you want but system will not set resolution to value it does not support.
PS I can provide you with C# source file to experiment.
Are you programmer?
There are two functions:
NtQueryTimerResolution
and
NtSetTimerResolution
. First one returns minimum, maximum and current resolutions.
Sure you can specify (with NtSetTimerResolution) any timer resolution you want but system will not set resolution to value it does not support.
PS I can provide you with C# source file to experiment.
Click to expand...
I'm learning to program but can't call myself a programmer yet, but i'll be glad if you could send me the source file so i can experiment and work my way trough
Thanks!
I'm learning to program but can't call myself a programmer yet, but i'll be glad if you could send me the source file so i can experiment and work my way trough
Thanks!
Click to expand...
Download v1 C# implementation from here
https://forums.guru3d.com/threads/windows-timer-resolution-tool-in-form-of-system-service.376458/
All its code related to timer resolution is in one function:
Code:
protected override void OnStart(string[] args)
base.OnStart(args);
uint CurrentResolution = 0;
uint MininumResolution = 0;
uint MaximumResolution = 0;
NtQueryTimerResolution(out MininumResolution, out MaximumResolution, out CurrentResolution);
bool SetResolution = true;
uint DesiredResolution = MaximumResolution*4;
NtSetTimerResolution(DesiredResolution, SetResolution, out CurrentResolution);
if(null != this.EventLog)
try { this.EventLog.WriteEntry(String.Format("Minimum={0}; Maximum={1}; Current={2}", MininumResolution, MaximumResolution, CurrentResolution)); }
catch {}
Change the line
uint DesiredResolution = MaximumResolution*4;
to something
uint DesiredResolution = MaximumResolution -
1000
;
(to experiment just change the number in bold font to 2000, 3000, 4000, ... - to subtract 200, 300, 400 microseconds. Build the service binary, start the service and check the resolution with any other tool).
Download v1 C# implementation from here
https://forums.guru3d.com/threads/windows-timer-resolution-tool-in-form-of-system-service.376458/
All its code related to timer resolution is in one function:
Code:
protected override void OnStart(string[] args)
base.OnStart(args);
uint CurrentResolution = 0;
uint MininumResolution = 0;
uint MaximumResolution = 0;
NtQueryTimerResolution(out MininumResolution, out MaximumResolution, out CurrentResolution);
bool SetResolution = true;
uint DesiredResolution = MaximumResolution*4;
NtSetTimerResolution(DesiredResolution, SetResolution, out CurrentResolution);
if(null != this.EventLog)
try { this.EventLog.WriteEntry(String.Format("Minimum={0}; Maximum={1}; Current={2}", MininumResolution, MaximumResolution, CurrentResolution)); }
catch {}
Change the line
uint DesiredResolution = MaximumResolution*4;
to something
uint DesiredResolution = MaximumResolution -
1000
;
(to experiment just change the number in bold font to 2000, 3000, 4000, ... - to subtract 200, 300, 400 microseconds. Build the service binary, start the service and check the resolution with any other tool).
Click to expand...
I see , managed to made the service ask a lower number (0.2ms) as shown
https://imgur.com/a/k5fveGE
I know for a fact that somewhere in a driver/dll there is a lock which doesn't allow to go past 5000ns , i've looked in ntdll.dll since the tool calls function from there but i haven't been able to find anything. Any ideas? Thanks for everything tho
I see , managed to made the service ask a lower number (0.2ms) as shown
https://imgur.com/a/k5fveGE
I know for a fact that somewhere in a driver/dll there is a lock which doesn't allow to go past 5000ns , i've looked in ntdll.dll since the tool calls function from there but i haven't been able to find anything. Any ideas? Thanks for everything tho
Click to expand...
Only disassemblers...
Hi, i need the timer resolution to be under 0.5ms...(don't ask me why)
Is it possible at all? If so, is there a program that let's you go past 0.5?
I tried reverse engineering timer resolution w ida-pro but it's a hell of headache and i think there are better ways ¯\_(ツ)_/¯
Click to expand...
that was a wish for me too in the past..to reduce that number as 0.1ms..anyway if you want current resolution a little below 0.500 like 0.482 maybe 0.488 just
disable HPET
in bios..but
do not Disable synthetic timers
if you did..
and in one day if you achieve to get it to work somehow in 0.1ms pls let me know dude..
It's not recommended to lower it past 0.500.
Fr33thy says it messes up the mouse input and some other timing stuff etc.
Click to expand...
Fr33thy has no respect among most of gurus here. But he said that not because of value lower than "0.5" but in context of newest versions of Windows 10 where you get not "0.5" as a lowest resolution but something less.