code: function getCpuCurrentSpeedSync() {
  
    let cpus = os.cpus();
    let minFreq = 999999999;
    let maxFreq = 0;
    let avgFreq = 0;
    let cores = [];
  
    if (cpus.length) {
      for (let i in cpus) {
        if (cpus.hasOwnProperty(i)) {
          avgFreq = avgFreq + cpus[i].speed;
          if (cpus[i].speed > maxFreq) maxFreq = cpus[i].speed;
          if (cpus[i].speed < minFreq) minFreq = cpus[i].speed;
        }
        cores.push(parseFloat(((cpus[i].speed + 1) / 1000).toFixed(2)));
      }
      avgFreq = avgFreq / cpus.length;
      return {
        min: parseFloat(((minFreq + 1) / 1000).toFixed(2)),
        max: parseFloat(((maxFreq + 1) / 1000).toFixed(2)),
        avg: parseFloat(((avgFreq + 1) / 1000).toFixed(2)),
        cores: cores
      };
    } else {
      return {
        min: 0,
        max: 0,
        avg: 0,
        cores: cores
      };
    }
  }
docs: -------------------------- CPU - current speed - in GHz