Page 1 of 1

Time limit

Posted: Fri Jun 03, 2005 8:54 am
by Kizman
Hi again,

I have a routine which calls another one. In this second routine, I've set the time limit to 1 second. Once the limit is reached, the execution stops (also the one of the first routine).
Is it possible, after the timeout, to come back to the first routine and to continue the execution?

Thanx.
Wongy

Posted: Fri Jun 03, 2005 9:30 am
by Syranide
the only way to do that is to do checks against a timer (e.g. time()) at regular intervals, or use ticks (look up "declare").

however, I don't think there is some really straight forward way to do this, perhaps you can throw an exception in the tick-function, sounds unlikely, but how knows, otherwise I would say go for the first one, or just ticks and a bool and check it ever so often.

don't have any other idea