implements PLN-0106

This commit is contained in:
2026-06-15 06:00:39 +01:00
parent 1d6b799960
commit 5381ae02b1
3 changed files with 34 additions and 27 deletions
@@ -1,4 +1,3 @@
use prometeu_drivers::hardware::Hardware;
use prometeu_firmware::Firmware;
use std::time::{Duration, Instant};
use winit::window::Window;
@@ -60,13 +59,7 @@ impl HostStats {
}
}
pub fn update(
&mut self,
now: Instant,
window: Option<&Window>,
_hardware: &Hardware,
firmware: &mut Firmware,
) {
pub fn update(&mut self, now: Instant, window: Option<&Window>, firmware: &mut Firmware) {
let stats_elapsed = now.duration_since(self.last_stats_update);
if stats_elapsed >= Duration::from_secs(1) {
self.current_fps = self.frames_since_last_update as f64 / stats_elapsed.as_secs_f64();