抄来一段:function TForm1.GetCpuSpeed: Extended;
var
    t, mhi, mlo, nhi, nlo: dword;
    shr32 : comp;
begin
    shr32 := 65536;
    shr32 := shr32 * 65536;
    t := GetTickCount;
    while t = GetTickCount do ;
    asm
        DB 0FH,031H // rdtsc
        mov mhi,edx
        mov mlo,eax
    end;
    while GetTickCount < (t + 1000) do ;
    asm
        DB 0FH,031H // rdtsc
        mov nhi,edx
        mov nlo,eax
    end;
    Result := ((nhi * shr32 + nlo) - (mhi * shr32 + mlo)) / 1E6;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
    label1.Caption := FloatToStr(GetCpuSpeed) + 'MHZ';
end;