diff options
| author | dam <dam@gudinoff> | 2024-05-11 03:48:44 +0100 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-05-11 03:48:44 +0100 |
| commit | c5bbb26a9fff9dd3623b9e12128999935bc4c6ab (patch) | |
| tree | b069423dca4f127b586b19b660d5fde516127f78 | |
| parent | 0ca96dad124b9a8935902f9c2f884bc63ee7e430 (diff) | |
| download | task-time-tracker-c5bbb26a9fff9dd3623b9e12128999935bc4c6ab.tar.zst task-time-tracker-c5bbb26a9fff9dd3623b9e12128999935bc4c6ab.zip | |
Cleanup some debug code.
| -rw-r--r-- | ttt.jai | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -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. |
