From e06296cc6180168abb9adb225ed475da51938240 Mon Sep 17 00:00:00 2001 From: danpros Date: Sat, 27 Mar 2021 11:37:22 +0700 Subject: [PATCH] More precise page generation time --- README.md | 2 +- system/includes/dispatch.php | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7a7beeb..f7dc9cd 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Features - User Roles - Online Backup - File Caching -- Auto Update +- Online Update - Post Draft - i18n - Menu builder diff --git a/system/includes/dispatch.php b/system/includes/dispatch.php index 019d0ff..7bb9b16 100644 --- a/system/includes/dispatch.php +++ b/system/includes/dispatch.php @@ -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" . ''; } else { ob_start();