tweaks: put some timing code back into the search function
parent
781c7a7a5f
commit
843eef65b8
10
src/search.c
10
src/search.c
|
@ -396,6 +396,12 @@ void go_looking(void)
|
||||||
linestruct *was_current = openfile->current;
|
linestruct *was_current = openfile->current;
|
||||||
size_t was_current_x = openfile->current_x;
|
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;
|
came_full_circle = FALSE;
|
||||||
|
|
||||||
didfind = findnextstr(last_search, FALSE, JUSTFIND, NULL, TRUE,
|
didfind = findnextstr(last_search, FALSE, JUSTFIND, NULL, TRUE,
|
||||||
|
@ -409,6 +415,10 @@ void go_looking(void)
|
||||||
else if (didfind == 0)
|
else if (didfind == 0)
|
||||||
not_found_msg(last_search);
|
not_found_msg(last_search);
|
||||||
|
|
||||||
|
#ifdef TIMEIT
|
||||||
|
statusline(HUSH, "Took: %.2f", (double)(clock() - start) / CLOCKS_PER_SEC);
|
||||||
|
#endif
|
||||||
|
|
||||||
edit_redraw(was_current, CENTERING);
|
edit_redraw(was_current, CENTERING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue