Re: Interesting sleep() side-effect

From: Date: Wed, 27 Jan 1999 23:30:19 +0000
Subject: Re: Interesting sleep() side-effect
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-3757@lists.php.net to get a copy of this message
On 27 Jan 99, at 7:51, Rasmus Lerdorf wrote: > If you run the script again with the sleep() call left > in, could you time it with a watch and see if it takes exactly 75 seconds > (assuming $i gets to 70)? I think that is what I am seeing here, but I am > not sure. I don't have a watch handy, so I'll just use the computer instead. :) > It is as if the time spent in the sleep() call does not count. That's what it looks like. Notice that sleep() time does not count as user time... No sleep(): # /usr/bin/time php test.php3 .................................................................. ..............<br>62 .................................................................. ..............<br><br> <b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in <b>test.php3</b> on line <b>13</b><br> 5.13 real 4.94 user 0.01 sys 1140 maximum resident set size 393 average shared memory size 647 average unshared data size 128 average unshared stack size 76 page reclaims 0 page faults 0 swaps 0 block input operations 1 block output operations 0 messages sent 0 messages received 1 signals received 1 voluntary context switches 309 involuntary context switches With sleep(): # /usr/bin/time -l php test.php3 .................................................................. ..............<br>69 .................................................................. ..............<br><br> <b>Fatal error</b>: Maximum execution time of 30 seconds exceeded in <b>test.php3</b> on line <b>13</b><br> 74.85 real 5.43 user 0.01 sys 1152 maximum resident set size 397 average shared memory size 654 average unshared data size 129 average unshared stack size 78 page reclaims 0 page faults 0 swaps 0 block input operations 1 block output operations 0 messages sent 0 messages received 70 signals received 70 voluntary context switches 322 involuntary context switches Dave ---------------------------------------------------------------------- Dave Walton Webmaster, Postmaster Emusic walton@emusic.com http://www.emusic.com ---------------------------------------------------------------------- -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3757) next »