diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-26 16:12:06 +0000 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-26 16:12:06 +0000 |
commit | 00ad00734ddb2c2fce8de8efcc010181c9ce1821 (patch) | |
tree | e6b79047fd2cfbef4733cfbd488ee4cb47d600d5 /src/tasks/cpuUsage.ts | |
parent | 1d6e64d5c43e4398e7c0488f114acba2c8a55164 (diff) | |
download | tanzanite-00ad00734ddb2c2fce8de8efcc010181c9ce1821.tar.gz tanzanite-00ad00734ddb2c2fce8de8efcc010181c9ce1821.tar.bz2 tanzanite-00ad00734ddb2c2fce8de8efcc010181c9ce1821.zip |
feat: use Time enum
Diffstat (limited to 'src/tasks/cpuUsage.ts')
-rw-r--r-- | src/tasks/cpuUsage.ts | 6 |
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; } } |