note 93568 added to function.microtime
| From: | bleakwind at gmail dot com | Date: | Wed, 16 Sep 2009 17:19:26 +0000 |
| Subject: | note 93568 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160752@lists.php.net to get a copy of this message | ||
Check Program runtime:
<?php
// Bleakwind at www.weaverdream.com
class bwruntime
{
var $timestart;
var $digits;
function bwruntime($digits = "")
{
$this->timestart = explode (' ', microtime());
$this->digits = $digits;
}
function totaltime()
{
$timefinish = explode (' ', microtime());
if($this->digits == ""){
$runtime_float = $timefinish[0] - $this->timestart[0];
}else{
$runtime_float = round(($timefinish[0] - $this->timestart[0]), $this->digits);
}
$runtime = ($timefinish[1] - $this->timestart[1]) + $runtime_float;
return $runtime;
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 119.122.233.19
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- https://master.php.net/note/edit/93568
Del: integrated -- https://master.php.net/note/delete/93568/integrated
Del: useless -- https://master.php.net/note/delete/93568/useless
Del: bad code -- https://master.php.net/note/delete/93568/bad+code
Del: spam -- https://master.php.net/note/delete/93568/spam
Del: non-english -- https://master.php.net/note/delete/93568/non-english
Del: in docs -- https://master.php.net/note/delete/93568/in+docs
Del: other reasons-- https://master.php.net/note/delete/93568
Reject -- https://master.php.net/note/reject/93568
Search -- https://master.php.net/manage/user-notes.php