valleyofdoom/TimerResolution ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Windows toolset that helps test and change timer resolution.
I want one program that can measure how accurate Sleep calls are, and show the delay between each sleep. It should be able to run forever by default, and also let me ask for a set number of samples so I can see average and standard deviation.
I also want a second program that can request a higher timer resolution from Windows, so the system can sleep with finer timing. It should support setting the resolution from the command line, and it would be nice if it can run quietly with no visible console so I could launch it from Task Scheduler at startup.
If it makes sense, include a simple script to run a bunch of tests and compare sleep precision at different resolution settings. Use current Windows docs or examples online if you need to, and make it easy to build and run from the command line.
Are you gonna build this?
make sure you review the code using coderabbit