Quelle ProfilerCPUFreq-linux-android.cpp
Sprache: C
/* 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/. */
ProfilerCPUFreq::ProfilerCPUFreq() { if (!mCPUCounters.resize(mozilla::GetNumberOfProcessors())) {
NS_WARNING("failing to resize the mCPUCounters vector"); return;
}
int cpufreq = 0;
rv = sscanf(buf, "%u", &cpufreq); if (NS_WARN_IF(rv != 1)) { return 0;
}
// Convert kHz to MHz, rounding to the nearst 10Mhz, to ignore tiny // variations that are likely due to rounding errors. return uint32_t(cpufreq / 10000) * 10;
}
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 ist noch experimentell.