-
Notifications
You must be signed in to change notification settings - Fork 16.9k
fix: make process.uptime() return the correct time #19436
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
Conversation
|
@deermichel before we merge this, do you want to try submitting a PR to nodejs/node to see if anyone from the node maintainer group has thoughts about it? |
|
Yep, sounds good to me :) --> nodejs/node#28849 |
|
@nornagon my node PR got merged 🎉. So can we keep the patch here until we reached the current upstream version? |
nornagon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup sgtm
|
@deermichel needs rebase ☝️ |
74cbc05 to
7013160
Compare
|
done ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also now that this is fixed we should re-enable the test/parallel/test-process-uptime node test
ac60f36 to
ebfefbf
Compare
ebfefbf to
09691d1
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "5-0-x" cleanly; |
|
I was unable to backport this PR to "6-0-x" cleanly; |
|
@deermichel could you please open manual backports for this to 5/6? |
|
oh missed this, sure... |
|
A maintainer has manually backported this PR to "5-0-x", please check out #19566 |
|
A maintainer has manually backported this PR to "6-0-x", please check out #19567 |
Description of Change
Fixes #19425.
The issue was rooted in an upstream change: nodejs/node#26016 (found its way to electron in #17752). Previously, the process-relative uptime was set in a method which got called by both
node::Start(used by nodejs) andnode::Init(used by embedders, deprecated) init methods. After the change, it is set directly innode::Startand thereby not when usingnode::Init. This PR just reverts that.Since i don't see any difference in either way of setting the variable, we might wanna upstream this patch so other embedders can benefit from it as well.
cc @MarshallOfSound @codebytere
Checklist
npm testpassesRelease Notes
Notes: Fixed
process.uptime()returning the wrong time.