diff options
| author | Albert Cervin <albert@acervin.com> | 2024-03-07 20:19:26 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-03-07 20:19:26 +0100 |
| commit | a13750209b3836a4a6a16a7ba881625f397f160f (patch) | |
| tree | 86c6ee6af1b44b613c6abc913957dda000c069a7 /src/dged/display.c | |
| parent | f266c624ad197ea6add738df70702dcbf93cb198 (diff) | |
| download | dged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.gz dged-a13750209b3836a4a6a16a7ba881625f397f160f.tar.xz dged-a13750209b3836a4a6a16a7ba881625f397f160f.zip | |
Implement timers properly
The timers shown with `M-x timers` are now actual timings.
Diffstat (limited to 'src/dged/display.c')
| -rw-r--r-- | src/dged/display.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dged/display.c b/src/dged/display.c index 85a6e0b..ed6fc00 100644 --- a/src/dged/display.c +++ b/src/dged/display.c @@ -2,6 +2,7 @@ #include "display.h" #include "buffer.h" +#include "timers.h" #include "utf8.h" #include <assert.h> @@ -358,6 +359,10 @@ void display_render(struct display *display, struct command_list *command_list) { struct command_list *cl = command_list; + static char name[32] = {0}; + snprintf(name, 31, "display.cl.%s", cl->name); + struct timer *render_timer = timer_start(name); + uint8_t fmt_stack[256] = {0}; fmt_stack[0] = ESC; fmt_stack[1] = '['; @@ -419,6 +424,8 @@ void display_render(struct display *display, } cl = cl->next_list; } + + timer_stop(render_timer); } void hide_cursor() { |
