RtlQueryPerformanceCounter/Frequency

I'm experimenting with replacing RtlQueryPerformanceCounter in Windows to use the RDTSC instruction for performance timing. I also patched RtlQueryPerformanceFrequency to use a calculated frequency that matches the RDTSC output. its works amazing

The issue I'm facing is that the system time accelerates extremely fast—e.g., it jumps from 11/25/2024 to 03/05/2025 in just a few seconds. I’m considering using KeUpdateSystemTime to manually adjust and synchronize the system time with the correct real-time values. is there a better way to synchronize the system time to not go fast when using rdtsc ?

Why on earth would you even think about doing this? QPC is functional and well-supported. You don't have any idea which system components make assumptions about the timing source. If YOU want to use RDTSC, feel free to do so, but you can't force the system to do that.

4ghz over 10mhz i7 8086k imgur.c o m/a/Um40YSq i found a way to fix it thanks