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] Fix the "Implicit conversion from float to int loses precision" error in Timebox Class #44357

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

memu
Copy link
Contributor

@memu memu commented Sep 28, 2022

The "Implicit conversion from float to int loses precision" error could be triggered since the $remainder variable on the line 27 is not always an integer.

$remainder = $microseconds - ((microtime(true) - $start) * 1000000);
if (! $this->earlyReturn && $remainder > 0) {
$this->usleep($remainder);
}

@taylorotwell taylorotwell merged commit eb7baf3 into laravel:9.x Sep 29, 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.

2 participants