fhandler_proc.cc(format_proc_cpuinfo): round cpu MHz

Round cpu MHz to correct Windows and match Linux cpuinfo.
This commit is contained in:
Brian Inglis 2019-10-07 10:23:01 -06:00 committed by Ken Brown
parent 9f73e24847
commit 996295780b
1 changed files with 1 additions and 0 deletions

View File

@ -695,6 +695,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab,
NULL, NULL);
cpu_mhz = ((cpu_mhz - 1) / 10 + 1) * 10; /* round up to multiple of 10 */
bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number);
uint32_t maxf, vendor_id[4], unused;