[+] Display fps
This commit is contained in:
@@ -440,7 +440,7 @@ async fn start_update_loop(mt: Arc<Mutex<Mutes>>, cn: &Consts) -> Result<()> {
|
|||||||
let draw_time = (end - now).as_secs_f32();
|
let draw_time = (end - now).as_secs_f32();
|
||||||
// Print draw time at 1, 1
|
// Print draw time at 1, 1
|
||||||
txt.push_str(&Goto(1, 1).to_string());
|
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
|
// Frame end with 3 Null bytes
|
||||||
txt.push_str("\x00\x00\x00");
|
txt.push_str("\x00\x00\x00");
|
||||||
|
|||||||
Reference in New Issue
Block a user