note 57951 added to function.getrusage

From: Date: Wed, 19 Oct 2005 23:21:59 +0000
Subject: note 57951 added to function.getrusage
Groups: php.notes 
Request: Send a blank email to php-notes+get-97264@lists.php.net to get a copy of this message
The author of the article mentioned in the previous post says "Once I got a negative value for both times - I have absolutely no clue how that can happen.". This is because time in microseconds is not padded with zeros from the left, therefore, you cannot concatenate the two numbers. Instead, you should normalize the values and then add them up: $dat["ru_utime.tv_sec"]*1e6+$dat["ru_utime.tv_usec"]; ---- Manual Page -- http://www.php.net/manual/en/function.getrusage.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57951 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57951&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57951&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97264) next »