Clear data before new bar display iteration
This makes sure that data displayed is always fresh
This commit is contained in:
@@ -116,6 +116,12 @@ impl UnibarModuleCpu {
|
||||
|
||||
impl bar_modules::BarModuleActions for UnibarModuleCpu {
|
||||
|
||||
// --------------------
|
||||
fn clear(&mut self) {
|
||||
self.cpu_times_sample_1 = CpuTimes::new();
|
||||
self.cpu_times_sample_2 = CpuTimes::new();
|
||||
}
|
||||
|
||||
// --------------------
|
||||
fn generate_data(&mut self) {
|
||||
self.cpu_times_sample_1 = self.read_cpu_times().expect("Trouble getting CPU times sample 1");
|
||||
|
Reference in New Issue
Block a user