FRC-Utilities / QDriverStation

Cross-platform clone of the FRC Driver Station
https://frc-utilities.github.io
MIT License
190 stars 26 forks source link

Fixed CPU usage indicator on Linux #27

Closed calcmogul closed 8 years ago

calcmogul commented 8 years ago

The previous implementation was only using one sample from /proc/stat to compute the current CPU usage. That gave the average CPU usage since system start. The correct way is to use the difference between two samples. This patch does so without needing to spawn a bash process.

alex-spataru commented 8 years ago

@calcmogul Thanks for the contribution, this could also help us solve some issues regarding Snap packages.