note 126384 added to function.microtime
| From: | wuscknrctrb at NOSPAM dot gmail dot com | Date: | Fri, 03 Sep 2021 04:11:55 +0000 |
| Subject: | note 126384 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216856@lists.php.net to get a copy of this message | ||
microtime() can be useful;
In every file (unless it can be batched with included)
At the beginning of the page generation
```php
//PageGen
$tt = microtime(true);
```
And, at the conclusion of the page generation, as practical as possible,
```php
<li>(PageGen <?php $tt = number_format(rtrim(sprintf("%.20f", (microtime(true) -
$tt)), "0"),6,'.',',');
echo $tt; ?> Seconds)</li>
```
In this way even very fast page generation times can be displayed without reverting to scientific
notation.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 159.196.71.245)
----
Manual Page -- https://php.net/manual/en/function.microtime.php
Edit -- https://main.php.net/note/edit/126384
Del: integrated -- https://main.php.net/note/delete/126384/integrated
Del: useless -- https://main.php.net/note/delete/126384/useless
Del: bad code -- https://main.php.net/note/delete/126384/bad+code
Del: spam -- https://main.php.net/note/delete/126384/spam
Del: non-english -- https://main.php.net/note/delete/126384/non-english
Del: in docs -- https://main.php.net/note/delete/126384/in+docs
Del: other reasons-- https://main.php.net/note/delete/126384
Reject -- https://main.php.net/note/reject/126384
Search -- https://main.php.net/manage/user-notes.php