fix draw time for axis modes
This commit is contained in:
@@ -113,6 +113,9 @@ impl<'a> Graph<'a> {
|
||||
}
|
||||
}
|
||||
fn draw_time(&self) {
|
||||
match self.axises {
|
||||
Axis::Two => {}
|
||||
Axis::One => {
|
||||
let ms_per_px = self.px_per_s / 1000.;
|
||||
// how many ms per segment
|
||||
let segment_len_ms = 100.;
|
||||
@@ -137,6 +140,8 @@ impl<'a> Graph<'a> {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fn draw_axises(&self) {
|
||||
// Horzontal line
|
||||
// (0, y_origin) -> (max, y_origin)
|
||||
@@ -313,7 +318,7 @@ async fn main() {
|
||||
graph.draw_time();
|
||||
|
||||
let frame_delta_time = get_frame_time();
|
||||
// keep track of the delta time since last plot
|
||||
// keep track of the time since last plot
|
||||
plot_delta_time += frame_delta_time;
|
||||
|
||||
match rx.try_recv() {
|
||||
|
||||
Reference in New Issue
Block a user