diff options
author | Ben Coburn <btcoburn@silicodon.net> | 2006-03-24 04:24:26 +0100 |
---|---|---|
committer | Ben Coburn <btcoburn@silicodon.net> | 2006-03-24 04:24:26 +0100 |
commit | a609a9cc3002627e7527161f5bd8883b3bd0633d (patch) | |
tree | eee30fc30d85576f5478810c68c5e5f8019c8748 | |
parent | 0e99f6d7194833f1a152c286a984baca203b25ef (diff) | |
download | rpg-a609a9cc3002627e7527161f5bd8883b3bd0633d.tar.gz rpg-a609a9cc3002627e7527161f5bd8883b3bd0633d.tar.bz2 |
show page generation time
darcs-hash:20060324032426-05dcb-cca609254cfef5b583510b86904f1656dea98fc7.gz
-rw-r--r-- | inc/init.php | 7 | ||||
-rw-r--r-- | lib/tpl/default/footer.html | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/inc/init.php b/inc/init.php index ab7cab3b8..ab986b0d2 100644 --- a/inc/init.php +++ b/inc/init.php @@ -3,6 +3,13 @@ * Initialize some defaults needed for DokuWiki */ + // start timing Dokuwiki execution + function delta_time($start=0) { + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec+(float)$sec)-((float)$start); + } + define('DOKU_START_TIME', delta_time()); + // define the include path if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); diff --git a/lib/tpl/default/footer.html b/lib/tpl/default/footer.html index 6d146c540..a3270d17a 100644 --- a/lib/tpl/default/footer.html +++ b/lib/tpl/default/footer.html @@ -55,4 +55,11 @@ $tgt = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : </rdf:RDF> --> + +<?php +if ($conf['allowdebug']) { + echo '<!-- page made in '.round(delta_time(DOKU_START_TIME), 3).' seconds -->'; +} +?> + </div> |