SystemStats::getCpuSpeedInMegaherz() appears to return the current CPU clock frequency on Linux systems with clock frequency scaling (e.g., upboard). At idle, on the 1.44GHz UpBoard I’m evaluating getCpuSpeedInMegaherz() returns 479MHz.
Is this the intent of this function? I would have thought it could be used to indicate potential processing power for a given platform in order to scale things like polyphony. Giving a low-ball answer like this though doesn’t exactly meet that goal.
The Linux implementation of SystemStats::getCpuSpeedInMegaherz() returns the first ‘cpu MHz’ value from /proc/cpuinfo, which is apparently the current clock frequency of that CPU. A complete CPU frequency range can be assembled from various /sys files or by examining the output of lscpu (the latter looks a whole lot simpler)