summaryrefslogtreecommitdiff
path: root/src/App.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.php')
-rw-r--r--src/App.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/App.php b/src/App.php
index 33f71ef..e2376b1 100644
--- a/src/App.php
+++ b/src/App.php
@@ -6,8 +6,12 @@ use Symfony\Component\Dotenv\Dotenv;
class App
{
+ private static float $executionStartTime;
+
public function __construct()
{
+ self::$executionStartTime = microtime(true);
+
$dotenv = new Dotenv();
$dotenv->load(dirname(__DIR__) . "/.env");
}
@@ -16,4 +20,9 @@ class App
{
Router::getInstance()->run()->send();
}
+
+ public static function getExectionTime(): float
+ {
+ return microtime(true) - self::$executionStartTime;
+ }
}