diff options
author | Juan José Arboleda <soyjuanarbol@gmail.com> | 2022-08-25 01:21:42 +0300 |
---|---|---|
committer | Juan José Arboleda <soyjuanarbol@gmail.com> | 2022-10-11 22:45:20 +0300 |
commit | 8f3ed25e08b2909ad7670a30e9672ce7a107b566 (patch) | |
tree | 9cd3a5fa4b3322a986c33dbc0b6e065f9a0bd20e /lib | |
parent | f38987edcc043caae0e66472b048124e9c5e9227 (diff) |
src: add error handling to `uv_uptime` call
PR-URL: https://github.com/nodejs/node/pull/44386
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/os.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/os.js b/lib/os.js index 81bbe15a9d2..b8948633cdd 100644 --- a/lib/os.js +++ b/lib/os.js @@ -55,7 +55,7 @@ const { getOSInformation: _getOSInformation, getTotalMem, getUserInfo, - getUptime, + getUptime: _getUptime, isBigEndian, setPriority: _setPriority } = internalBinding('os'); @@ -80,6 +80,8 @@ const { const getHomeDirectory = getCheckedFunction(_getHomeDirectory); const getHostname = getCheckedFunction(_getHostname); const getInterfaceAddresses = getCheckedFunction(_getInterfaceAddresses); +const getUptime = getCheckedFunction(_getUptime); + /** * @returns {string} */ |