procedure Delay(D: DWORD);
var Start: DWORD;
begin
Start := GetTickCount;
while GetTickCount - Start <= D do
//死等待
//while GetTickCount - Start <= D do Application.ProcessMessages
//可以处理其他消息
end;
procdure A
begin
try
...
except
delay(1000);
A;
end
end