Time limit

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Kizman
Forum Newbie
Posts: 4
Joined: Fri Jun 03, 2005 8:40 am

Time limit

Post 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
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post 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
Post Reply