blob: e2376b1d234b01afb5f6dbbdacb73ffe05ec1480 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
namespace App;
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");
}
public function run(): void
{
Router::getInstance()->run()->send();
}
public static function getExectionTime(): float
{
return microtime(true) - self::$executionStartTime;
}
}
|