From f5d72d660afb7db076aec2761c0b217c54669849 Mon Sep 17 00:00:00 2001 From: Nicholas Schamberg Date: Mon, 14 Dec 2020 01:57:15 +0300 Subject: [PATCH 1/6] doc: update os.uptime() Makes it clear that os.uptime() is unreliable in some virtualization cases. --- doc/api/os.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/api/os.md b/doc/api/os.md index 6c184a77854b1e..026bc74265057d 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -366,7 +366,15 @@ changes: * Returns: {integer} -Returns the system uptime in number of seconds. +Returns the system uptime in number of seconds. + +Please be aware that the value returned can be inaccurate in some rare virtualization cases. +The issue arises when the virtualized guest instance shares the kernel with the host system +due to a bug in libuv. `os.uptime()` may thus provide the host's uptime instead of guest's. + +Please refer to and + for an exploration of +this issue, until it is resolved by libuv. ## `os.userInfo([options])`