nie chce mi sie szukac w arhiwum :)
oto kod:
procedure TForm1.Button1Click(Sender: TObject);
var
Freq, TimeStart, TimeEnd : Int64;
i: integer;
test : extended;
begin
if QueryPerformanceFrequency(Freq) then
begin
QueryPerformanceCounter(TimeStart);
{ poczatek kodu do tesatoania }
for i:=1 to 10000 do
begin
test:=random;
end;
{ koniec kodu do testowania }
QueryPerformanceCounter(TimeEnd);
Label1.Caption:='Wykonanie 10 000 razy zajelo: '+
FloatToStr((TimeEnd-TimeStart)/Freq*1000)+
' ms';
end;
end;---=-=[ Delphi 3, 6 ]=-=-
-=-=-==[ LKS ]==-=-=-
-=[ [email protected] ]=-