Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle:  CpuInfo_win.cpp  Sprache: C


/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "CpuInfo.h"

#include <windows.h>

namespace mozilla {

int GetCpuFrequencyMHz() {
  static const int frequency = []() {
    // Get the nominal CPU frequency.
    DWORD data;
    DWORD len = sizeof(data);
    if (::RegGetValueW(HKEY_LOCAL_MACHINE,
                       LR"(HARDWARE\DESCRIPTION\System\CentralProcessor\0)",
                       L"~Mhz", RRF_RT_REG_DWORD, nullptr, &data,
                       &len) == ERROR_SUCCESS) {
      return static_cast<int>(data);
    }

    return 0;
  }();

  return frequency;
}

}  // namespace mozilla

Messung
CHZG
8810010096

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*Bot Zugriff







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,189,280
#Domains=1,022,077
Batch läuft