Kod:
function RDTSC : Int64; assembler; asm db $0F, $31 end; function RDQPC : Int64; begin QueryPerformanceCounter(result); end; function CPUSpeed : Integer; var f,tsc,pc : Int64; begin if QueryPerformanceFrequency(f) then begin Sleep(0); pc := RDQPC; tsc := RDTSC; Sleep(100); pc := RDQPC-pc; tsc := RDTSC-tsc; result := round(tsc*f/(pc*1000000)); end else result := -1; end; Kullanımı Kod: showmessage(Format('%d Mhz', [CPUSpeed]));