forked from friendica/friendica-addons
Refactor dynamic App::getProfiler() to static DI::profiler()
This commit is contained in:
parent
44bf0343e2
commit
33dae7eb94
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
use Friendica\DI;
|
||||||
|
|
||||||
function rendertime_install() {
|
function rendertime_install() {
|
||||||
Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
Hook::register('page_end', 'addon/rendertime/rendertime.php', 'rendertime_page_end');
|
||||||
|
@ -30,7 +31,7 @@ function rendertime_init_1(&$a) {
|
||||||
function rendertime_page_end(Friendica\App $a, &$o)
|
function rendertime_page_end(Friendica\App $a, &$o)
|
||||||
{
|
{
|
||||||
|
|
||||||
$profiler = $a->getProfiler();
|
$profiler = DI::profiler();
|
||||||
|
|
||||||
$duration = microtime(true) - $profiler->get('start');
|
$duration = microtime(true) - $profiler->get('start');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue