I work on programming language profiler and I am looking for a timer solution for Windows with better than 100 ns resolution.
QueryPerformanceCountershould be an answer, but the returned frequency byQueryPerformanceFrequencyis 10 MHz on Windows 10 and even less on Windows 7GetSystemTimePreciseAsFileTimehas 100 ns tick/stepRDTSChas resolution better than 1ns, but it varies with frequency
My target resolution is at least 10 ns.
What is currently the best solution?
How QueryPerformanceCounter is implemented? can it be easily disassembed and the resolution increased?
Is it somehow possible to use RDTSC directly and track/interrupt on every frequency change?