用定时器阿,设定Interval:= 1000,然后在OnTimer里面处理
用一个全局变量Counter;
Form1.OnTimer(Sender:TObject);
begin
if GetSignal then Inc(Counter);
if Counter = 5
begin
do what you want;
Counter := 0;
end;
end;
用一个全局变量Counter;
Form1.OnTimer(Sender:TObject);
begin
if GetSignal then Inc(Counter);
if Counter = 5
begin
do what you want;
Counter := 0;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货