Added mechanism to skip updates in a module
* This is useful in modules where HTTP API calls are made. Updating them every second is expensive, network intensive and can cause rate limits to be hit * Added get_name() function to modules for easier debug statements
This commit is contained in:
@@ -116,6 +116,11 @@ impl UnibarModuleCpu {
|
||||
|
||||
impl bar_modules::BarModuleActions for UnibarModuleCpu {
|
||||
|
||||
// --------------------
|
||||
fn get_name(&self) -> String {
|
||||
return "UnibarModuleCpu".to_string();
|
||||
}
|
||||
|
||||
// --------------------
|
||||
fn clear(&mut self) {
|
||||
self.cpu_times_sample_1 = CpuTimes::new();
|
||||
|
Reference in New Issue
Block a user