I'm trying to get a value into a variable from the osutils cpu usage method, but seem to be having some troubles in doing so.
const osutils = require('os-utils')
function getCPUUsage () {
const usage = osutils.cpuUsage((value) => {
return value
});
return usage
}
I need to console.log the getCPUUsage function and expect it to contain a value