This is not an error connected to the latence of QueryPerformanceCounter (not at all, in some % of value surely yes), but the fact the Windows is not a real time OS, so the timings cannot be and will never be precise.
You can set the thread for a CRIT. priority, but before it there are kernel, drivers, and some thousand of other processes.
So, don't set nothing to "crtical", is not necessary. Use TStopWatch (you can use more instance of record to make more measures) insert it in you normal code.
REPORT the values in memory, NEVER ON CONSOLE. Under Windows, the console consume a lot of time to execute something like "writeln" (and it stop your execution).
I tried rdtsc (and sometimes I still used it) but the difference from TStopWatch are really little. And rdtsc are really some contraindications very heavy.
I normally use like 36 TStopWatch to monitor most of things of mine applications, and with or without them there is no difference of timing, no change of CPU loading, nothing (but I use a Intel CPU class I9 always).
Of course, if you want a mediate precise time measuring you can use rdtsc (take 10 measure and do a media), but this change you process execution and the real timing of your application.