Einzelnen Beitrag anzeigen

EdAdvokat

Registriert seit: 1. Mai 2016
Ort: Berlin
414 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#40

AW: Gute Neuigkeit! DEC 6.2 soeben released!

  Alt 9. Jul 2021, 10:55
Entschuldigung, habe den "Helm" leider nicht exakt aufgesetzt:

Delphi-Quellcode:
procedure TFormMain.RunBenchmark(ClassName: string; RowIndex: Integer);
var
  Hash : TDECHash;
  HashResult : TBytes;
  i : Integer;
begin
  Hash := TDECHash.ClassByName(ClassName).Create;

  try
    FStopwatch.Reset;
    FStopwatch.Start;

    for i := 0 to cIterations - 1 do
    begin
      HashResult := Hash.CalcBytes(FBenchmarkBuffer);
    end;

    FStopwatch.Stop;

    sg_Results.Cells[1, RowIndex] :=
      Format('%0:f', [cIterations / (FStopwatch.ElapsedMilliseconds/1000)]);
    sg_Results.Cells[2, RowIndex] := FStopwatch.Elapsed; //.ToString;
  finally
    Hash.Free;
  end;
end;
Norbert
  Mit Zitat antworten Zitat