title: Better than 100ns resolution timers in Windows
body: <p>I work on programming language profiler and I am looking for a timer solution for Windows with better than 100 ns resolution.</p>
  <ul>
  <li><p><code>QueryPerformanceCounter</code> should be an answer, but the returned frequency by <code>QueryPerformanceFrequency</code> is 10 MHz on Windows 10 and even less on Windows 7</p>
  </li>
  <li><p><code>GetSystemTimePreciseAsFileTime</code> has 100 ns tick/step</p>
  </li>
  <li><p><code>RDTSC</code> has resolution better than 1ns, but it varies with frequency</p>
  </li>
  </ul>
  <p>My target resolution is at least 10 ns.</p>
  <p>What is currently the best solution?</p>
  <p>How <code>QueryPerformanceCounter</code> is implemented? can it be easily disassembed and the resolution increased?</p>
  <p>Is it somehow possible to use <code>RDTSC</code> directly and track/interrupt on every frequency change?</p>