Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Round milliseconds in console output runtime #43400

Merged
merged 1 commit into from
Jul 25, 2022
Merged

[9.x] Round milliseconds in console output runtime #43400

merged 1 commit into from
Jul 25, 2022

Conversation

SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Jul 25, 2022

Commands always show how long they took to run in milliseconds with 2 decimal precision. This PR rounds the milliseconds, because having 2 decimal precision on milliseconds is unnecessary.

Before:
image

After:
image

@@ -38,7 +38,7 @@ public function render($description, $task = null, $verbosity = OutputInterface:
throw $e;
} finally {
$runTime = $task
? (' '.number_format((microtime(true) - $startTime) * 1000, 2).'ms')
? (' '.number_format((microtime(true) - $startTime) * 1000).'ms')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could also use round() here...

@taylorotwell taylorotwell merged commit 6bdc085 into laravel:9.x Jul 25, 2022
Ken-vdE pushed a commit to Ken-vdE/framework that referenced this pull request Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants