aboutsummaryrefslogtreecommitdiff
path: root/src/tasks/cpuUsage.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks/cpuUsage.ts')
-rw-r--r--src/tasks/cpuUsage.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tasks/cpuUsage.ts b/src/tasks/cpuUsage.ts
index 9985e48..e5cfc00 100644
--- a/src/tasks/cpuUsage.ts
+++ b/src/tasks/cpuUsage.ts
@@ -1,16 +1,16 @@
-import { BushTask } from '#lib';
+import { BushTask, Time } from '#lib';
import osu from 'node-os-utils';
export default class CpuUsageTask extends BushTask {
public constructor() {
super('cpuUsage', {
- delay: 60_000, // 1 minute
+ delay: Time.Minute,
runOnStart: true
});
}
public override async exec() {
- const cpu = await osu.cpu.usage(client.stats.cpu === undefined ? 100 : 60_000);
+ const cpu = await osu.cpu.usage(client.stats.cpu === undefined ? 100 * Time.Millisecond : Time.Minute);
client.stats.cpu = cpu;
}
}