cpu.cc - fixed missing header and variable misname

This commit is contained in:
l0ner 2014-04-14 20:57:00 +02:00
parent 5e354b9221
commit b0ab6ea57a

@ -3,6 +3,7 @@
#include <unistd.h> // usleep #include <unistd.h> // usleep
#include "cpu.h" #include "cpu.h"
#include "../luts.h"
float cpu_percentage( unsigned cpu_usage_delay ) { float cpu_percentage( unsigned cpu_usage_delay ) {
std::string line; std::string line;
@ -31,7 +32,7 @@ float cpu_percentage( unsigned cpu_usage_delay ) {
usleep( cpu_usage_delay ); usleep( cpu_usage_delay );
stat_file.open("/proc/stat"); stat_file.open("/proc/stat");
getline(stat_file, stat_line); getline(stat_file, line);
stat_file.close(); stat_file.close();
// skip "cpu" // skip "cpu"