active, utilization: active / (idle + active) };
  }

  const idle = nodeTiming.idleTime;
  const active = now() - ls - idle;

  if (!util1) {
    return { idle, active, utilization: active / (idle + active) };
  }

  const idle_delta = idle - util1.idle;
  const active_delta = active - util1.active;
  const utilization = active_delta / (idle_delta + active_delta);
  return { idle: idle_delta, active: active_delta, utilization };
}

module.exports = eventLoopUtilization;
