Skip to content

Commit 86127f1

Browse files
committed
cpu: remove legacy usage_average
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I5e3be11c9f9db5e57d91546d1c8718e66a6a6964
1 parent 0506c77 commit 86127f1

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

watt/cpu.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ impl CpuStat {
6363

6464
1.0 - idle_delta / total_delta
6565
}
66-
67-
/// Calculates usage since boot (average utilization).
68-
/// This is the historical average, not current usage.
69-
pub fn usage_average(&self) -> f64 {
70-
let total = self.total() as f64;
71-
if total == 0.0 {
72-
return 0.0;
73-
}
74-
1.0 - self.idle() as f64 / total
75-
}
7666
}
7767

7868
#[derive(Default, Debug, Clone)]

0 commit comments

Comments
 (0)