mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 01:32:42 +01:00 
			
		
		
		
	limit cpu load figure to 2 points
This commit is contained in:
		@@ -62,7 +62,7 @@ auto waybar::modules::Cpu::update() -> void {
 | 
			
		||||
double waybar::modules::Cpu::getCpuLoad() {
 | 
			
		||||
  double load[1];
 | 
			
		||||
  if (getloadavg(load, 1) != -1) {
 | 
			
		||||
    return load[0];
 | 
			
		||||
    return std::ceil(load[0] * 100.0) / 100.0;
 | 
			
		||||
  }
 | 
			
		||||
  throw std::runtime_error("Can't get Cpu load");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user