Re: set_time_limit () - CPU time or elapsed time?

From: Date: Sat, 12 Apr 2014 20:06:22 +0000
Subject: Re: set_time_limit () - CPU time or elapsed time?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-323180@lists.php.net to get a copy of this message
On 4/12/2014 3:14 PM, Tim Streater wrote:
This function limits the"execution time" for a script. Is this CPU time or elapsed (wall-clock)
time?
I'm asking because I'm running Win7 in a VirtualBox VM under OS X Mavericks.
I've got an app that runs a number of scripts, using PHP 5.5.9. All runs correctly, but quite slowly, and a one script reports taking 20 secs or so of elapsed time when I might have expected 2 or 3 at most (as the same script running under OS X does).
I know that there is a note in the online doc for this function that says
that under windows, extra time such as database calls is included. Would that include SQLite calls which wouldn't be included for the OS X version?
I've got a windows user whose scripts are actually running out of time,
so I may have to add a php_value to the apache config to crank up the time limit.
Tim Streater Bedford House Kake St Waltham CT4 5RZ 01227 700322 Having made some coding errors that put me in a loop or some other almost-endless process, I do believe that the time limit is cpu time. My host uses a default of 30 secs and I have chosen to reset my .ini file to be a 2 second default simply because that is quite a long time in processing terms and I don't want something to tick away for 30 seconds of CPU time.
If you have a user whose scripts (a user writing their own scripts) I'd say you might want to examine that logic. That - or you've got a hell of a lot of number crunching going on.

« previous php.general (#323180) next »