Skip to content

Commit

Permalink
Use REQUEST_TIME_FLOAT instead of LARAVEL_START
Browse files Browse the repository at this point in the history
Easier to overwrite for php-pm etc.
  • Loading branch information
barryvdh committed Apr 16, 2016
1 parent ab8b948 commit 0de8f95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ public function boot()
}

if ($this->shouldCollect('time', true)) {
$startTime = defined('LARAVEL_START') ? LARAVEL_START : null;
$this->addCollector(new TimeDataCollector($startTime));
$this->addCollector(new TimeDataCollector());

if ( ! $this->isLumen()) {
$this->app->booted(
function () use ($debugbar, $startTime) {
function () use ($debugbar) {
$startTime = $this->app['request']->server('REQUEST_TIME_FLOAT');
if ($startTime) {
$debugbar['time']->addMeasure('Booting', $startTime, microtime(true));
}
Expand Down Expand Up @@ -176,7 +176,7 @@ function () use ($debugbar, $startTime) {

if ($this->shouldCollect('events', false) && isset($this->app['events'])) {
try {
$startTime = defined('LARAVEL_START') ? LARAVEL_START : null;
$startTime = $this->app['request']->server('REQUEST_TIME_FLOAT');
$eventCollector = new EventCollector($startTime);
$this->addCollector($eventCollector);
$this->app['events']->subscribe($eventCollector);
Expand Down

0 comments on commit 0de8f95

Please sign in to comment.