CpuInfo constructor

CpuInfo({
  1. required int numOfProcessors,
  2. required String archName,
  3. required String modelName,
  4. required List<String> features,
  5. required List<ProcessorInfo> processors,
  6. required List<double> temperatures,
})

Implementation

CpuInfo({
  /// The number of logical processors.
  required int numOfProcessors,

  /// The architecture name of the processors.
  required String archName,

  /// The model name of the processors.
  required String modelName,

  /// A set of feature codes indicating some of the processor's capabilities.
  /// The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3",
  /// "sse4_1", "sse4_2", and "avx".
  required List<String> features,

  /// Information about each logical processor.
  required List<ProcessorInfo> processors,

  /// List of CPU temperature readings from each thermal zone of the CPU.
  /// Temperatures are in degrees Celsius.
  ///
  /// **Currently supported on Chrome OS only.**
  required List<double> temperatures,
}) : _wrapped = $js.CpuInfo(
        numOfProcessors: numOfProcessors,
        archName: archName,
        modelName: modelName,
        features: features.toJSArray((e) => e),
        processors: processors.toJSArray((e) => e.toJS),
        temperatures: temperatures.toJSArray((e) => e),
      );