Re: A question about max_execution_time

From: Date: Mon, 10 Apr 2006 19:26:17 +0000
Subject: Re: A question about max_execution_time
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-233688@lists.php.net to get a copy of this message
On Mon, April 10, 2006 1:48 pm, Eric Butera wrote: > Thank you for your response. I did read that in the manual, I > promise. > That is why I included the sleep function in my example. Shouldn't > the > sleep function count as execution time? One thing I didn't metion > earlier, > for the sake of simplicity, is that my script is pulling an XML file. > After > I get the XML file I parse through it which also takes time too. The > recordset is about 6 thousand records so it does take a while. 'sleep' doesn't count. That's even in the 3rd to last User Contributed Note. :-) Always read the Notes. You may have to wade through some [bleep] but you'll find some nuggets of info well worth the effort. The primary goal of set_time_limit is to keep scripts from slamming the server and taking ALL the CPU time. If the script is sleeping, it's not taking CPU time. I missed the beginning of the thread, but if you need to count 'sleep' time, you'll just have to code it yourself somehow... I suppose the first item on your agenda might be to contribute a get_time_spent() function to the PHP source that returned whatever value PHP is using to track this CPU usage. :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#233688) next »