I need to set timeout for procedure running.
For example :
I am running a procedure which is taking 5 sec. I should stop the procedure if it takes more than 2 seconds. Please help me on this.
Basically you need to roll your own logic to code the time out. As the AVM is not multi-threaded you can't have a time keeper and your processing logic in parallel. You _COULD_ do something like this ( where the glWaitForResult logical would be set to true in some trigger that responds to an OCX event for example ). If the logical is not set at the end of the wait you know that your logic didn't complete.
Code:
&SCOPED-DEFINE TIME-OUT 2
ETIME ( TRUE ).
/* Wait on the result or the time out after seconds ... */
DO WHILE glWaitForResult AND ETIME / 1000 < {&TIME-OUT}:
PROCESS EVENTS.
END.
AFAIK, STOP-AFTER has been introduced with OE11 and is not available in previous releases. But since the OP did not say anything about what versions we are talking ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.