summaryrefslogtreecommitdiff
path: root/src/dged/timers.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-05-06 22:42:39 +0200
committerAlbert Cervin <albert@acervin.com>2024-05-06 22:42:39 +0200
commitad0cd5c036f0080ee8d97db2e67b8d54186d1e33 (patch)
treeb85cc21acac6e1383dfa3b78494ce09c409b2f30 /src/dged/timers.h
parentc42412e1643c88c81cf5b38404cc010881437fe9 (diff)
downloaddged-ad0cd5c036f0080ee8d97db2e67b8d54186d1e33.tar.gz
dged-ad0cd5c036f0080ee8d97db2e67b8d54186d1e33.tar.xz
dged-ad0cd5c036f0080ee8d97db2e67b8d54186d1e33.zip
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.
Diffstat (limited to 'src/dged/timers.h')
-rw-r--r--src/dged/timers.h6
1 files changed, 5 insertions, 1 deletions
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 <stdint.h>
+
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);