diff options
Diffstat (limited to 'ttt.jai')
| -rw-r--r-- | ttt.jai | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -895,7 +895,14 @@ update_layout :: () { } } -draw_tui :: (db: *Database, layout: *Layout) { +dbg_average := 0; // DEBUG +dbg_count := 0; // DEBUG +draw_user_interface :: (db: *Database, layout: *Layout) { + + start := current_time_monotonic(); // DEBUG + + + // TODO During dirty_flag revamp...we may also start using the String_Builder. @@ -1094,6 +1101,13 @@ draw_tui :: (db: *Database, layout: *Layout) { TUI.set_style(style_default); x += 1; print_time(y, x, total_time, layout.columns[L_TOTAL_IDX].width); + + stop := current_time_monotonic(); // DEBUG + dbg_sample := to_nanoseconds(stop-start); // DEBUG + dbg_average = (dbg_sample + dbg_count * dbg_average) / (dbg_count + 1); // DEBUG + dbg_count += 1; // DEBUG + TUI.set_cursor_position(3, 1); + print("Average % us ---------", dbg_average/1000); // DEBUG } free_memory :: () { @@ -1371,7 +1385,7 @@ main :: () { write_strings(INVALID_WINDOW_MESSAGE); } else { - draw_tui(db, layout); + draw_user_interface(db, layout); draw_error_window(); } |
