par_term/app/
debug_state.rs1use std::time::{Duration, Instant};
2
3pub struct DebugState {
5 pub frame_times: Vec<Duration>, pub cell_gen_time: Duration, pub render_time: Duration, pub cache_hit: bool, pub last_frame_start: Option<Instant>, pub show_fps_overlay: bool, pub fps_value: f64, }
13
14impl Default for DebugState {
15 fn default() -> Self {
16 Self::new()
17 }
18}
19
20impl DebugState {
21 pub fn new() -> Self {
22 Self {
23 frame_times: Vec::with_capacity(60),
24 cell_gen_time: Duration::ZERO,
25 render_time: Duration::ZERO,
26 cache_hit: false,
27 last_frame_start: None,
28 show_fps_overlay: false,
29 fps_value: 0.0,
30 }
31 }
32}