diff options
author | Brian Inglis <Brian.Inglis@SystematicSW.ab.ca> | 2019-10-07 10:23:01 -0600 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2019-10-07 15:50:32 -0400 |
commit | 70e834ea7c970dd9bf98167e0cf7d4d7c643a225 (patch) | |
tree | 0e527c18ca3c1f019fee6f04ad886ed7c79985b8 | |
parent | 7a0496f78f60d43cf9545a794cbf8c00d7bb8e02 (diff) | |
download | cygnal-70e834ea7c970dd9bf98167e0cf7d4d7c643a225.tar.gz cygnal-70e834ea7c970dd9bf98167e0cf7d4d7c643a225.tar.bz2 cygnal-70e834ea7c970dd9bf98167e0cf7d4d7c643a225.zip |
fhandler_proc.cc(format_proc_cpuinfo): round cpu MHz
Round cpu MHz to correct Windows and match Linux cpuinfo.
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index c94cde910..86c1f6253 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -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; |