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

Fix elapsedMicros always returning zero #98

Merged
merged 2 commits into from May 4, 2023
Merged

Conversation

lexidor
Copy link
Contributor

@lexidor lexidor commented Apr 27, 2023

$this->start and $this->end have the same unit, inferred via endTime(). That function adds the two without doing a unit conversion first. $this->start has the unit seconds.

elapsedMicros() used to divide by 1_000_000 and return megaseconds. By swapping the division with a multiplication, elapsedMicros() now returns microseconds.

`$this->start` and `$this->end` have the same unit, inferred via `endTime()`.
That function adds the two without doing a unit conversion first.
`$this->start` has the unit seconds.

`elapsedMicros()` used to divide by 1_000_000 and return megaseconds.
By swapping the division with a multiplication, `elapsedMicros()` now returns microseconds.
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @lexidor to sign the Salesforce Inc. Contributor License Agreement.

@muglug muglug merged commit 395f442 into slackhq:main May 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants