aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/cpuUsage.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-16 14:32:18 -0400
commit0e87bbd3940d89defcb04926587b35c8f4d1947f (patch)
treee50860d4dc25a11d4c3977b583284c4bcad1b077 /src/tasks/cpuUsage.ts
parent661e4c9935aeb8760dafc7ced4bbec6cc356a033 (diff)
downloadtanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.gz
tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.tar.bz2
tanzanite-0e87bbd3940d89defcb04926587b35c8f4d1947f.zip
remove util classes, move config out of src
Diffstat (limited to 'src/tasks/cpuUsage.ts')
-rw-r--r--src/tasks/cpuUsage.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tasks/cpuUsage.ts b/src/tasks/cpuUsage.ts
index e5cfc00..6ce6671 100644
--- a/src/tasks/cpuUsage.ts
+++ b/src/tasks/cpuUsage.ts
@@ -1,5 +1,5 @@
import { BushTask, Time } from '#lib';
-import osu from 'node-os-utils';
+import { cpu } from 'node-os-utils';
export default class CpuUsageTask extends BushTask {
public constructor() {
@@ -9,8 +9,8 @@ export default class CpuUsageTask extends BushTask {
});
}
- public override async exec() {
- const cpu = await osu.cpu.usage(client.stats.cpu === undefined ? 100 * Time.Millisecond : Time.Minute);
- client.stats.cpu = cpu;
+ public async exec() {
+ const cpuStats = await cpu.usage(client.stats.cpu === undefined ? 100 * Time.Millisecond : Time.Minute);
+ client.stats.cpu = cpuStats;
}
}