Comparing version
{ | ||
"name": "cpu-idle", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get cpu load info", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# cpuload | ||
# CPU Idle | ||
Get cpu load info | ||
@@ -9,7 +9,7 @@ | ||
``` | ||
const CPULoad = require('cpuload'); | ||
const CPUIdle = require('cpu-idle'); | ||
const idle = await CPULoad.idle(1000); // get the average load in the last 1000ms | ||
const idle = await CPUIdle.idle(1000); // get the average load in the last 1000ms | ||
const detail = await CPULoad.measure(1000); // get the detailed cpu times in the last 1000ms | ||
const detail = await CPUIdle.measure(1000); // get the detailed cpu times in the last 1000ms | ||
``` | ||
@@ -20,10 +20,10 @@ | ||
``` | ||
const CPULoad = require('cpuload'); | ||
const CPUIdle = require('cpu-idle'); | ||
const cpuload = new CPULoad(); | ||
cpuload.watch(); | ||
const cpuIdle = new CPUIdle(); | ||
cpuIdle.watch(); | ||
await delay(5000); | ||
const idle = cpuload.idle(); | ||
const idle = cpuIdle.idle(); | ||
``` |
7334
0.04%