added a warn when frame lag

This commit is contained in:
Mwa
2026-03-24 23:16:33 +01:00
parent 8d7cb5e6f3
commit 3525db5299

View File

@@ -261,6 +261,7 @@ impl<'a> ApplicationHandler for App<'a> {
let now = Instant::now();
if next < now {
next = now + Duration::from_secs_f64(1. / 30.);
println!("Warning: rendering is lagging!")
}
event_loop.set_control_flow(winit::event_loop::ControlFlow::WaitUntil(next));
if let Some(w) = self.w.as_ref() {