]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Renderer.php
Replace own VoidLogger with PSR-Standard NullLogger()
[friendica.git] / src / Core / Renderer.php
index b6b443d5039a5b19ee08882ba95b934788ea06ba..ad1717ae83f422495425179620632d673ed867b7 100644 (file)
@@ -73,7 +73,7 @@ class Renderer
         */
        public static function replaceMacros(string $template, array $vars = [])
        {
-               $stamp1 = microtime(true);
+               DI::profiler()->startRecording('rendering');
 
                // pass $baseurl to all templates if it isn't set
                $vars = array_merge(['$baseurl' => DI::baseUrl()->get(), '$APP' => DI::app()], $vars);
@@ -90,7 +90,7 @@ class Renderer
                        throw new InternalServerErrorException($message);
                }
 
-               DI::profiler()->saveTimestamp($stamp1, "rendering");
+               DI::profiler()->stopRecording();
 
                return $output;
        }
@@ -106,7 +106,7 @@ class Renderer
         */
        public static function getMarkupTemplate($file, $subDir = '')
        {
-               $stamp1 = microtime(true);
+               DI::profiler()->startRecording('file');
                $t = self::getTemplateEngine();
 
                try {
@@ -119,7 +119,7 @@ class Renderer
                        throw new InternalServerErrorException($message);
                }
 
-               DI::profiler()->saveTimestamp($stamp1, "file");
+               DI::profiler()->stopRecording();
 
                return $template;
        }