add a comment to show runtime at the end of a page
This commit is contained in:
parent
1543af748c
commit
ca4bf54131
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user