[+] Display fps

This commit is contained in:
Azalea Gui
2023-03-09 01:38:17 -05:00
parent b601c72cc6
commit 13a5cbf2bc
+1 -1
View File
@@ -440,7 +440,7 @@ async fn start_update_loop(mt: Arc<Mutex<Mutes>>, cn: &Consts) -> Result<()> {
let draw_time = (end - now).as_secs_f32();
// Print draw time at 1, 1
txt.push_str(&Goto(1, 1).to_string());
txt.push_str(&*format!("\r{:.2}ms", draw_time * 1000.0));
txt.push_str(&*format!("\r{:.2}ms ({:.1} fps)", draw_time * 1000.0, 1.0 / draw_time));
// Frame end with 3 Null bytes
txt.push_str("\x00\x00\x00");