Re: [PHP4BETA] getrusage() doesn't seem to return anything

From: Date: Wed, 23 Feb 2000 01:44:25 +0000
Subject: Re: [PHP4BETA] getrusage() doesn't seem to return anything
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-10684@lists.php.net to get a copy of this message
I had this same *exact* problem today. I did a trivial little hack to get it to work, but I can't guarantee that this will work on platforms other than linux. Attached is a patch to ext/standard/microtime.c to enable getrusage in linux. Beware that this is a hack, because I really don't understand the build environment for PHP. (Haven't had time to learn autoconf/automake, etc). Good luck. Peter On Tue, 22 Feb 2000, August Zajonc wrote: > Do any compile time switches need to be thrown for this to work? What are > the requirements to enable this baby. > > The following code, taken from the manual returns nothing. > > $dat = getrusage(); > echo $dat[1]; > echo $dat["ru_majflt"]; > echo $dat["ru_utime.tv_sec"]; > echo $dat["ru_utime.tv_usec"]; > > Help *much* appreciated. > > August > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > > -------------------------------------------------- Peter D. Kovacs KnowPost.com LLC Pb Engineer peter@knowpost.com --------------------------------------------------

« previous php.version4 (#10684) next »