tweaks: put some timing code back into the search function

master
Benno Schulenberg 2019-06-09 18:48:52 +02:00
parent 781c7a7a5f
commit 843eef65b8
1 changed files with 10 additions and 0 deletions

View File

@ -396,6 +396,12 @@ void go_looking(void)
linestruct *was_current = openfile->current;
size_t was_current_x = openfile->current_x;
//#define TIMEIT 12
#ifdef TIMEIT
#include <time.h>
clock_t start = clock();
#endif
came_full_circle = FALSE;
didfind = findnextstr(last_search, FALSE, JUSTFIND, NULL, TRUE,
@ -409,6 +415,10 @@ void go_looking(void)
else if (didfind == 0)
not_found_msg(last_search);
#ifdef TIMEIT
statusline(HUSH, "Took: %.2f", (double)(clock() - start) / CLOCKS_PER_SEC);
#endif
edit_redraw(was_current, CENTERING);
}