diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-28 14:44:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 14:44:22 +0200 |
commit | e5b2815b3943cd39038bba00da462082c6988e6e (patch) | |
tree | 54953513a9c2947dcb2611f079512d07a0f5a0c9 /ext/node/polyfills/os.ts | |
parent | 10012c2fe312a4f7ddc5217adaa6718c91bfb819 (diff) |
Reland "refactor: remove Deno[Deno.internal].nodeUnstable namespace" (#18475)
This reverts commit 357bcfcf79fee92195e37bb3f05e247908f207c5.
Diffstat (limited to 'ext/node/polyfills/os.ts')
-rw-r--r-- | ext/node/polyfills/os.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts index 69ca19bc5..19e8fd155 100644 --- a/ext/node/polyfills/os.ts +++ b/ext/node/polyfills/os.ts @@ -25,15 +25,11 @@ import { validateIntegerRange } from "ext:deno_node/_utils.ts"; import process from "ext:deno_node/process.ts"; import { isWindows, osType } from "ext:deno_node/_util/os.ts"; import { os } from "ext:deno_node/internal_binding/constants.ts"; - +import { osUptime } from "ext:runtime/30_os.js"; export const constants = os; const SEE_GITHUB_ISSUE = "See https://github.com/denoland/deno_std/issues/1436"; -// @ts-ignore Deno[Deno.internal] is used on purpose here -const DenoOsUptime = Deno[Deno.internal]?.nodeUnstable?.osUptime || - Deno.osUptime; - interface CPUTimes { /** The number of milliseconds the CPU has spent in user mode */ user: number; @@ -310,7 +306,7 @@ export function type(): string { /** Returns the Operating System uptime in number of seconds. */ export function uptime(): number { - return DenoOsUptime(); + return osUptime(); } /** Not yet implemented */ |