Irgendetwas scheint aber immernoch nicht zu stimmen....
Ist denn jetzt noch was falsch???
Delphi-Quellcode:
procedure THauptprogramm.bQuickSortClick(Sender: TObject);
var i : integer;
start,stop,Ausgabe : Int64;
begin
QueryPerformanceCounter(Start); {GetTickCount ist nicht möglich, da QuickSort zu schnell ist}
QuickSort(Feld,Low(Feld),High(Feld));
QueryPerformanceCounter(Stop);
Ausgabe := (Stop-Start);
QueryPerformanceFrequency(Ausgabe);
for i := low(Feld) to high(Feld) do
begin
sgToSort.Cells[i,0] := IntToStr(Feld[i]);
end;
if cbBerechnung.Checked = True
then MessageDlg('QuickSort benötigte: '+IntToStr(Ausgabe)+' Sekunden',mtInformation,[mbOk],0)
else MessageDlg('Es wurde sortiert!',mtInformation,[mbOk],0);
end;
Ausgabe hat nun etwa den Wert 3973945 Sekunden bei mir