Commit ca4bf541 authored by Evan Prodromou's avatar Evan Prodromou

add a comment to show runtime at the end of a page

parent 1543af74
......@@ -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
......
......@@ -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("<!-- ${diff}ms -->");
}
return parent::endHTML();
}
/**
* Show head, a template method.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment