]> git.mxchange.org Git - friendica.git/commitdiff
Parameters should be float ...
authorMichael <heluecht@pirati.ca>
Thu, 10 Dec 2020 00:02:23 +0000 (00:02 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 10 Dec 2020 00:02:23 +0000 (00:02 +0000)
src/App.php
src/Util/Profiler.php

index fca8052e321434c313615b53daacbfc3aa2cc484..de8311848969c079ad530122c5c81c776fbad87d 100644 (file)
@@ -415,12 +415,9 @@ class App
         * @throws HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public function runFrontend(App\Module $module, App\Router $router, IPConfig $pconfig, Authentication $auth, App\Page $page, int $start_time = 0)
+       public function runFrontend(App\Module $module, App\Router $router, IPConfig $pconfig, Authentication $auth, App\Page $page, float $start_time)
        {
-               if ($start_time != 0) {
-                       $this->profiler->set($start_time, 'start');
-               }
-
+               $this->profiler->set($start_time, 'start');
                $this->profiler->set(microtime(true), 'classinit');
 
                $moduleName = $module->getName();
index a60601098d450ff4f6a043be9bc6f34861cdfdb2..f963e20609bdc2eb93b0eb890167e82f6b8675a7 100644 (file)
@@ -134,7 +134,8 @@ class Profiler implements ContainerInterface
        public function resetPerformance()
        {
                $this->performance = [];
-               $this->performance['start'] = $this->performance['ready'] = microtime(true);
+               $this->performance['start'] = microtime(true);
+               $this->performance['ready'] = 0;
                $this->performance['database'] = 0;
                $this->performance['database_write'] = 0;
                $this->performance['cache'] = 0;
@@ -145,7 +146,8 @@ class Profiler implements ContainerInterface
                $this->performance['parser'] = 0;
                $this->performance['marktime'] = 0;
                $this->performance['marktime'] = microtime(true);
-               $this->performance['frontend'] = 0;
+               $this->performance['classcreate'] = 0;
+               $this->performance['classinit'] = 0;
                $this->performance['init'] = 0;
                $this->performance['content'] = 0;
        }