From ad0cd5c036f0080ee8d97db2e67b8d54186d1e33 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Mon, 6 May 2024 22:42:39 +0200 Subject: Fix slow buffer paste Was caused by updating all buffer hooks on every char insert. Particularily, the syntax update takes a little bit too long to call on every char. Now the keyboard parsing routine compresses all consecutive self-inserting chars into one "key press". Also fix some small issues with timers and update them with a min and max. --- src/dged/timers.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/dged/timers.h') diff --git a/src/dged/timers.h b/src/dged/timers.h index 4911b54..ae79a8b 100644 --- a/src/dged/timers.h +++ b/src/dged/timers.h @@ -1,15 +1,19 @@ #ifndef _TIMERS_H #define _TIMERS_H +#include + struct timer; void timers_init(); void timers_start_frame(); struct timer *timer_start(const char *name); -void timer_stop(struct timer *timer); +uint64_t timer_stop(struct timer *timer); struct timer *timer_get(const char *name); float timer_average(const struct timer *timer); +uint64_t timer_min(const struct timer *timer); +uint64_t timer_max(const struct timer *timer); const char *timer_name(const struct timer *timer); typedef void (*timer_callback)(const struct timer *timer, void *userdata); -- cgit v1.2.3