Skip to content

Commit 9b6376a

Browse files
vsemozhetbytjasnell
authored andcommitted
doc: update os.uptime() and process.uptime() info
PR-URL: #12294 Fixes: #12291 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 71704fb commit 9b6376a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/api/os.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,8 @@ added: v0.3.3
378378

379379
The `os.uptime()` method returns the system uptime in number of seconds.
380380

381-
*Note*: Within Node.js' internals, this number is represented as a `double`.
382-
However, fractional seconds are not returned and the value can typically be
383-
treated as an integer.
381+
*Note*: On Windows the returned value includes fractions of a second.
382+
Use `Math.floor()` to get whole seconds.
384383

385384
## os.userInfo([options])
386385
<!-- YAML

doc/api/process.md

+3
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,9 @@ added: v0.5.0
16721672
The `process.uptime()` method returns the number of seconds the current Node.js
16731673
process has been running.
16741674

1675+
*Note*: the return value includes fractions of a second. Use `Math.floor()`
1676+
to get whole seconds.
1677+
16751678
## process.version
16761679
<!-- YAML
16771680
added: v0.1.3

0 commit comments

Comments
 (0)