Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Commands/StartRoadRunnerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected function writeServerOutput($server)
* Calculate the elapsed time for a request.
*
* @param string $elapsed
* @return int
* @return float
*/
protected function calculateElapsedTime(string $elapsed): float
{
Expand All @@ -205,10 +205,10 @@ protected function calculateElapsedTime(string $elapsed): float
}

if (Str::endsWith($elapsed, 'µs')) {
return $elapsed * 0.001;
return mb_substr($elapsed, 0, -2) * 0.001;
}

return $elapsed * 1000;
return (float)$elapsed * 1000;
}

/**
Expand Down