WordPress 中文文档
Function Reference/timer stop
From WordPress Chinese
目录 |
[编辑]
Description
This function returns the amount of time (in seconds) to generate the page.
[编辑]
Usage
%%% <?php timer_stop($display = 0, $precision = 3) ?> %%%
[编辑]
Example
[编辑]
Usage
Determine length of time to render page with a precision of 3, 5 and 10 digits.
<?php echo('Seconds: ' . timer_stop(0) . '<br />'); ?>
<?php echo('Seconds: ' . timer_stop(0,5) . '<br />'); ?>
<?php echo('Seconds: '); timer_stop(1,10); echo('<br />'); ?>
Seconds: 0.815
Seconds: 0.81551
Seconds: 0.8155429363
[编辑]
Parameters
- display
- (integer) Possible values: 0 or 1. Defaults to 0.
- precision
- (integer) Possible values: 0 or 1. Defaults to 3.
