From 2d7176a06a09a5fd2b99e7b4c17f503e8d86ad22 Mon Sep 17 00:00:00 2001 From: Ruan Date: Fri, 17 Jul 2015 11:43:59 +0200 Subject: [PATCH] Print page generation time --- bans.php | 2 +- includes/page.php | 7 +++++++ mutes.php | 2 +- warnings.php | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bans.php b/bans.php index e083dba..8260d22 100644 --- a/bans.php +++ b/bans.php @@ -39,5 +39,5 @@ $page = new Page(); - + print_footer(); ?> diff --git a/includes/page.php b/includes/page.php index 4a8858e..8618bf7 100644 --- a/includes/page.php +++ b/includes/page.php @@ -9,6 +9,7 @@ class Page { $this->conn = $settings->conn; $this->settings = $settings; $this->uuid_name_cache = array(); + $this->time = microtime(true); } function get_query($table) { @@ -105,6 +106,12 @@ class Page { '); } + + function print_footer() { + include './includes/footer.php'; + $time = microtime(true) - $this->time; + echo ""; + } } ?> diff --git a/mutes.php b/mutes.php index 93135c8..d1f6d82 100644 --- a/mutes.php +++ b/mutes.php @@ -38,5 +38,5 @@ $page = new Page(); - + print_footer(); ?> diff --git a/warnings.php b/warnings.php index 9e8203d..16b73f5 100644 --- a/warnings.php +++ b/warnings.php @@ -40,5 +40,5 @@ $page = new Page(); - + print_footer(); ?>