From c5bbb26a9fff9dd3623b9e12128999935bc4c6ab Mon Sep 17 00:00:00 2001 From: dam Date: Sat, 11 May 2024 03:48:44 +0100 Subject: Cleanup some debug code. --- ttt.jai | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index 700ebbd..f9afd52 100644 --- a/ttt.jai +++ b/ttt.jai @@ -923,9 +923,6 @@ get_layout_index_from_day_index :: inline (day_index: int) -> int { return (day_index - first_day_of_week + NUM_WEEK_DAYS) % NUM_WEEK_DAYS; } -dbg_average := 0; // DEBUG -dbg_count := 0; // DEBUG - draw_user_interface :: (db: *Database, layout: *Layout, redraw_all: bool = true) { auto_release_temp(); @@ -1446,17 +1443,7 @@ main :: () { write_strings(INVALID_WINDOW_MESSAGE); } else { -start := current_time_monotonic(); // DEBUG - draw_user_interface(db, layout, redraw_all); - -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); -TUI.tui_print("Average % us (% / % : % bytes) ---------", dbg_average/1000, context.temporary_storage.total_bytes_occupied, context.temporary_storage.high_water_mark, context.temporary_storage.size); // DEBUG - draw_error_window(); } @@ -1468,10 +1455,6 @@ TUI.tui_print("Average % us (% / % : % bytes) ---------", dbg_average/1000, cont update_times(*database); - - if key == #char "k" { dbg_average = 0; dbg_count = 0; redraw_all = false; continue; } // DEBUG - - /* TODO Remove `selected_task` and `active_task` and helper functions. Every time we add or remove tasks to the database, it may be reallocated, thus making the selected_task and active_task pointers invalid. Check if this is messing up the app. -- cgit v1.2.3