udp设置超时问题
大家好
我想在规定3秒内udp控件发数据 超过3秒则提示超时
请问怎么做
timer
ir := MilliSecondsBetween(now, dtBegin) mod 1000;
if (ir >= 0) and (ir <= iInterval) then
begin
。。。。
end
这样做不对
请问该怎么做?
[解决办法]
iSecond:=SecondsBetween(begTime,Now); 不行吗 为什么要mod 1000?
if iSecond>=3 then
begin
超时
end