You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc: are os.uptime() returned type and remark correct? #12291
changed the title [-]doc: are `os.uptime()` retutned type and remark correct?[/-][+]doc: are `os.uptime()` returned type and remark correct?[/+]on Apr 9, 2017
The documentation is wrong-ish. uv_uptime() returns (in an out param) a double but the UNIX implementations of that function don't currently bother to mix in the sub-second fraction. That could change in the future though, if someone requests it.
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.
Activity
[-]doc: are `os.uptime()` retutned type and remark correct?[/-][+]doc: are `os.uptime()` returned type and remark correct?[/+]gibfahn commentedon Apr 9, 2017
Output on macOS (Sierra):
Output on Ubuntu 16.04:
vsemozhetbyt commentedon Apr 9, 2017
So it seems this is wrong only for Windows. What should be fixed — doc or Windows implementation?
vsemozhetbyt commentedon Apr 9, 2017
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
bnoordhuis commentedon Apr 9, 2017
The documentation is wrong-ish.
uv_uptime()returns (in an out param) a double but the UNIX implementations of that function don't currently bother to mix in the sub-second fraction. That could change in the future though, if someone requests it.vsemozhetbyt commentedon Apr 9, 2017
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.
bnoordhuis commentedon Apr 9, 2017
How about this?
Feel free to steal and PR.
gibfahn commentedon Apr 9, 2017
Maybe worth changing
on some platformstoon Windowsif it's Windows specific.vsemozhetbyt commentedon Apr 9, 2017
I've combined two propositions in #12294
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info
doc: update os.uptime() and process.uptime() info