Skip to content

Commit

Permalink
Add "page generated in .. seconds"
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed Apr 26, 2022
1 parent 50ae233 commit 1af2ec8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Backend/Views/Base/LayoutView.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function render(): void {
color: var(--on-bg);
background-color: var(--bg);
}
footer { text-align: center }
@media screen and (prefers-color-scheme: dark) { :root { --on-bg: #fff; --bg: #151515; } }
</style>
</head>
Expand All @@ -38,7 +39,7 @@ public function render(): void {
</main>

<footer>

<p>This page was generated in <?=microtime(true) - $GLOBALS['start']?> seconds</p>
</footer>
</body>
</html>
Expand Down
3 changes: 1 addition & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

declare(strict_types = 1);

// $GLOBALS['start'] = microtime(true); // Stop execution time
// echo '<p>[Controller] Execution time router: ' . microtime(true) - $GLOBALS['start'] . ' seconds</p>';
$GLOBALS['start'] = microtime(true); // Meassure execution time -> look in Layout <footer>

// Display errors when debug is set
/* if (isset($_GET["DEBUG"])) {
Expand Down

0 comments on commit 1af2ec8

Please sign in to comment.