Add timing information to page

feature/node-rewrite
Sven Slootweg 13 years ago
parent ca4386e78e
commit 3cffa42c0d

@ -11,6 +11,8 @@
* licensing text. * licensing text.
*/ */
$timing_start = microtime(true);
$_CVM = true; $_CVM = true;
require("includes/include.base.php"); require("includes/include.base.php");
@ -72,7 +74,8 @@ $sTemplateParameters = array_merge($sTemplateParameters, array(
'logged-in' => $sLoggedIn, 'logged-in' => $sLoggedIn,
'title' => $sPageTitle, 'title' => $sPageTitle,
'main' => $sMainContents, 'main' => $sMainContents,
'main-class' => $sMainClass 'main-class' => $sMainClass,
'generation' => "<!-- page generated in " . (round(microtime(true) - $timing_start, 6)) . " seconds. -->"
)); ));
echo(Templater::AdvancedParse("main", $locale->strings, $sTemplateParameters)); echo(Templater::AdvancedParse("main", $locale->strings, $sTemplateParameters));

@ -34,5 +34,6 @@
</div> </div>
</div> </div>
<img class="preload" src="images/loading.gif"> <img class="preload" src="images/loading.gif">
{%?generation}
</body> </body>
</html> </html>

Loading…
Cancel
Save