summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/os.ts16
1 files changed, 3 insertions, 13 deletions
diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts
index d1f5e7bfa..283ce5a0b 100644
--- a/ext/node/polyfills/os.ts
+++ b/ext/node/polyfills/os.ts
@@ -32,6 +32,8 @@ import { os } from "ext:deno_node/internal_binding/constants.ts";
import { osUptime } from "ext:runtime/30_os.js";
import { Buffer } from "ext:deno_node/internal/buffer.mjs";
+const ops = core.ops;
+
export const constants = os;
interface CPUTimes {
@@ -129,19 +131,7 @@ export function arch(): string {
(uptime as any)[Symbol.toPrimitive] = (): number => uptime();
export function cpus(): CPUCoreInfo[] {
- return Array.from(Array(navigator.hardwareConcurrency), () => {
- return {
- model: "",
- speed: 0,
- times: {
- user: 0,
- nice: 0,
- sys: 0,
- idle: 0,
- irq: 0,
- },
- };
- });
+ return ops.op_cpus();
}
/**