-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: are os.uptime()
returned type and remark correct?
#12291
Comments
os.uptime()
retutned type and remark correct?os.uptime()
returned type and remark correct?
Output on macOS (Sierra): > os.uptime()
245758
> process.uptime()
281.972 Output on Ubuntu 16.04: > os.uptime()
174
> process.uptime()
9.451 |
So it seems this is wrong only for Windows. What should be fixed — doc or Windows implementation? |
If Windows implementation should be fixed, is it worth to land it in 8.0 as this is semver-major (despite of the doc though)? cc @nodejs/platform-windows |
The documentation is wrong-ish. |
So the doc should describe OS-dependent behavior here? If so, can anybody edit it, as I am not good at writing long English text properly? Or I can open a PR with a proposed wording. |
How about this?
Feel free to steal and PR. |
Maybe worth changing |
I've combined two propositions in #12294 |
Currently, both
os.uptime()
andprocess.uptime()
return number with fractional seconds on Windows:However, their docs are different here:
https://github.com/nodejs/node/blame/7a5d07c7fbd43f3645d7f707fd6a98f2a251bdbd/doc/api/os.md#L372-L384
https://github.com/nodejs/node/blame/47f8f7462fb198aa27ede602c43786bdbfda37a2/doc/api/process.md#L1662-L1671
Are
os.uptime()
returned typeinteger
and*Note*
outdated or just OS-dependent?The text was updated successfully, but these errors were encountered: