mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
More precise page generation time
This commit is contained in:
parent
84f4e565e6
commit
e06296cc61
2 changed files with 3 additions and 10 deletions
|
|
@ -40,7 +40,7 @@ Features
|
|||
- User Roles
|
||||
- Online Backup
|
||||
- File Caching
|
||||
- Auto Update
|
||||
- Online Update
|
||||
- Post Draft
|
||||
- i18n
|
||||
- Menu builder
|
||||
|
|
|
|||
|
|
@ -351,16 +351,9 @@ function render($view, $locals = null, $layout = null)
|
|||
header('Content-type: text/html; charset=utf-8');
|
||||
if (config('generation.time') == 'true') {
|
||||
ob_start();
|
||||
$time = microtime();
|
||||
$time = explode(' ', $time);
|
||||
$time = $time[1] + $time[0];
|
||||
$start = $time;
|
||||
require $layout;
|
||||
$time = microtime();
|
||||
$time = explode(' ', $time);
|
||||
$time = $time[1] + $time[0];
|
||||
$finish = $time;
|
||||
$total_time = round(($finish - $start), 4);
|
||||
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
|
||||
$total_time = round($time, 4);
|
||||
echo "\n" . '<!-- Dynamic page generated in '.$total_time.' seconds. -->';
|
||||
} else {
|
||||
ob_start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue