note 126384 deleted from function.microtime by cmb
| From: | cmb@php.net | Date: | Sat, 04 Sep 2021 16:57:20 +0000 |
| Subject: | note 126384 deleted from function.microtime by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216860@lists.php.net to get a copy of this message | ||
Note Submitter: wuscknrctrb at NOSPAM dot gmail dot com
----
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.