|
Delays the execution of code that comes after this procedure (in milliseconds). |
|
Seconds |
Determines how many milliseconds the delay will last. |
|
function Integer WaitTSLTime(var string replystr,Integer replylen)
begin
Integer res;
Integer noErr;
LongInt timeout;
LongInt tickcount, tick;
res = 12400;
replystr = "";
timeout = 800;
tick = GetCurTick;
tickcount = tick;
while ((tickcount-tick)<timeout) begin
tickcount = GetCurTick;
res = ReplyInTSLBuffer(replystr,replylen);
if (len(replystr)>=replylen) or ((replylen==255) and (len(replystr)>0)) then begin
res = noErr;
goto LWaitTSLTime;
end;
MilliSleep(10);
end;
LWaitTSLTime:;
WaitTSLTime = res;
return;
end;
««