diff --git a/index.php b/index.php index 6f011e7e5b..37c157b01f 100644 --- a/index.php +++ b/index.php @@ -37,6 +37,8 @@ * @license GNU Affero General Public License http://www.gnu.org/licenses/ */ +$_startTime = microtime(true); + define('INSTALLDIR', dirname(__FILE__)); define('STATUSNET', true); define('LACONICA', true); // compatibility diff --git a/lib/action.php b/lib/action.php index 0e5d7ae361..24d7527196 100644 --- a/lib/action.php +++ b/lib/action.php @@ -111,6 +111,19 @@ class Action extends HTMLOutputter // lawsuit } } + function endHTML() + { + global $_startTime; + + if (isset($_startTime)) { + $endTime = microtime(true); + $diff = round(($endTime - $_startTime) * 1000); + $this->raw(""); + } + + return parent::endHTML(); + } + /** * Show head, a template method. *