/* -*- 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.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include"CpuInfo.h"
#include <windows.h>
namespace mozilla {
int GetCpuFrequencyMHz() { staticconstint 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);
}
return0;
}();
return frequency;
}
} // namespace mozilla
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.