Use LARAVEL_START constant to calculate request time.
Suggested by @Kindari.
This commit is contained in:
parent
204a6a7980
commit
37dbeef2bb
|
@ -181,20 +181,11 @@ public static function referrer()
|
||||||
/**
|
/**
|
||||||
* Get the timestamp of the time when the request was started.
|
* Get the timestamp of the time when the request was started.
|
||||||
*
|
*
|
||||||
* The value is actually calculated when this function gets first called.
|
|
||||||
*
|
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function time()
|
public static function time()
|
||||||
{
|
{
|
||||||
static $time;
|
return (int) LARAVEL_START;
|
||||||
|
|
||||||
if (!isset($time))
|
|
||||||
{
|
|
||||||
$time = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue