bugfix: performance.now function should return MS instead of nano - #428
Merged
Merged
Conversation
Pruxis
commented
Jul 8, 2022
Pruxis
left a comment
Contributor
Author
There was a problem hiding this comment.
Unsure if correct but I think this solves
https://github.com/Jarred-Sumner/bun/issues/413
FinnRG
reviewed
Jul 8, 2022
Comment on lines
1499
to
1500
| double result = time / 1000000000000000.0; | ||
| return JSValue::encode(jsNumber(time)); |
Contributor
There was a problem hiding this comment.
You are still returning the time variable. Please calculate double result = time / 1000000.0; and change jsNumber(time) to jsNumber(result)
Contributor
Author
There was a problem hiding this comment.
I overlooked that, the added 0's are incorrect and should be time / 1_000_000.0 I suppose
Contributor
|
Maybe should add a test like https://github.com/Jarred-Sumner/bun/blob/main/test/bun.js/performance.test.js |
Closed
dylan-conway
added a commit
that referenced
this pull request
Aug 14, 2026
…8 fix); test it via a forced C.UTF-8 locale on Linux; adapt netd's Job to the new JobContext::run signature WEBKIT_VERSION points at the preview tag until #428 merges; the Linux-run intl test fails on the previous WebKit (en-US-u-va-posix) and passes with it.
dylan-conway
added a commit
that referenced
this pull request
Aug 14, 2026
…reats C.UTF-8 as the C locale) Replaces the preview pin; #428 is the only commit between the previous pin (687eb8e1b73c) and this one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.