cpu.cc - fixed missing header and variable misname
This commit is contained in:
parent
5e354b9221
commit
b0ab6ea57a
@ -3,6 +3,7 @@
|
||||
#include <unistd.h> // usleep
|
||||
|
||||
#include "cpu.h"
|
||||
#include "../luts.h"
|
||||
|
||||
float cpu_percentage( unsigned cpu_usage_delay ) {
|
||||
std::string line;
|
||||
@ -31,7 +32,7 @@ float cpu_percentage( unsigned cpu_usage_delay ) {
|
||||
usleep( cpu_usage_delay );
|
||||
|
||||
stat_file.open("/proc/stat");
|
||||
getline(stat_file, stat_line);
|
||||
getline(stat_file, line);
|
||||
stat_file.close();
|
||||
|
||||
// skip "cpu"
|
||||
|
Loading…
Reference in New Issue
Block a user