Print page generation time

This commit is contained in:
Ruan 2015-07-17 11:43:59 +02:00
parent 598dc950a9
commit 2d7176a06a
4 changed files with 10 additions and 3 deletions

View File

@ -39,5 +39,5 @@ $page = new Page();
</table>
</div>
</div>
<?php include './includes/footer.php'; ?>
<?php $page->print_footer(); ?>
</div>

View File

@ -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 {
</div>
');
}
function print_footer() {
include './includes/footer.php';
$time = microtime(true) - $this->time;
echo "<!-- Page generated in $time seconds. -->";
}
}
?>

View File

@ -38,5 +38,5 @@ $page = new Page();
</table>
</div>
</div>
<?php include './includes/footer.php'; ?>
<?php $page->print_footer(); ?>
</div>

View File

@ -40,5 +40,5 @@ $page = new Page();
</table>
</div>
</div>
<?php include './includes/footer.php'; ?>
<?php $page->print_footer(); ?>
</div>