diff --git a/ts/smartmetrics.classes.smartmetrics.ts b/ts/smartmetrics.classes.smartmetrics.ts index 557cf54..211f1ca 100644 --- a/ts/smartmetrics.classes.smartmetrics.ts +++ b/ts/smartmetrics.classes.smartmetrics.ts @@ -49,11 +49,9 @@ export class SmartMetrics { cpu.times.irq + cpu.times.idle; } - - // Normalize the one returned by process.cpuUsage() - // (microseconds VS miliseconds) + const usage = process.cpuUsage(); - const currentCPUUsage = (usage.user + usage.system) * 1000; + const currentCPUUsage = (usage.user + usage.system); // Find out the percentage used for this specific CPU const perc = (currentCPUUsage / total) * 100;