procedure GetPDF(Bill: text) ReturnPDF: Boolean begin <Statement> end; procedure TryCallData() begin while not GetPDF('HMO986') do message('waiting...'); end;
Pablogrind wrote: »thanks @txeriff Is there a way to stop if loop takes more than 2 minutes?
Answers
Hi,
Not sure what you trying to run on GetPDF but if you want to wait 2 minutes try
getpdf('');
sleep(10800); //seconds
and thats it.
it won´t be time but I don´t want now to write you the whole code´(and time calculations are always pain), just use a counter :
vcounter:=0;
repeat
vcounter+=1;
until vcounter>=10800
for time:
vTime:=TIME;
SLEEP(3000); //wait 3 seconds
vTimeDec:=TIME-vTime;
MESSAGE(FORMAT(vTimeDec)); //time difference