summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/process.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2024-09-05 21:21:29 +0900
committerGitHub <noreply@github.com>2024-09-05 21:21:29 +0900
commitdda63287456aae5cd4f7f428e23b52cb8c0005e5 (patch)
treeca1ee2443a3c19c8f910fd21907e5fa0ed8c98be /ext/node/polyfills/process.ts
parent5319b85f14d919c8a3f390a8db53c95922f1cf8d (diff)
fix(ext/node): stub `process.cpuUsage()` (#25462)
closes #23401
Diffstat (limited to 'ext/node/polyfills/process.ts')
-rw-r--r--ext/node/polyfills/process.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts
index f09d7ceed..f84255814 100644
--- a/ext/node/polyfills/process.ts
+++ b/ext/node/polyfills/process.ts
@@ -430,6 +430,14 @@ Process.prototype.config = {
},
};
+Process.prototype.cpuUsage = function () {
+ warnNotImplemented("process.cpuUsage()");
+ return {
+ user: 0,
+ system: 0,
+ };
+};
+
/** https://nodejs.org/api/process.html#process_process_cwd */
Process.prototype.cwd = cwd;