IdIcmpClient.ping 返回值不稳定
procedure TForm1.Button1Click(Sender: TObject);begin
begin
repeat
IdIcmpClient1.Host:= edit1.Text;
IdIcmpClient1.Ping;
application.ProcessMessages;
sleep(2000);
until getkeystate(vk_F12)=1
end;
end;
procedure TForm1.IdIcmpClient1Reply(ASender: TComponent;
const AReplyStatus: TReplyStatus);
begin
memo1.Lines.Add(inttostr(AReplyStatus.MsRoundTripTime));
end;