From f1174247fabd31f5cdfae40b0d7cf096605e85c8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 20 Aug 2023 04:58:51 +0200 Subject: [PATCH] One last timer fix to fix the slowness reported by Ompronce. --- src/timer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/timer.c b/src/timer.c index 13e5d836f..9a3ed805f 100644 --- a/src/timer.c +++ b/src/timer.c @@ -15,8 +15,6 @@ pc_timer_t *timer_head = NULL; /* Are we initialized? */ int timer_inited = 0; -static int timer_in_process = 0; - static void timer_advance_ex(pc_timer_t *timer, int start); void @@ -116,8 +114,6 @@ timer_process(void) if (!timer_head) return; - timer_in_process = 0; - while (1) { timer = timer_head; @@ -141,8 +137,6 @@ timer_process(void) } timer_target = timer_head->ts.ts32.integer; - - timer_in_process = 1; } void @@ -250,7 +244,7 @@ timer_on_auto(pc_timer_t *timer, double period) return; if (period > 0.0) - timer_on(timer, period, !timer_in_process && (timer->period <= 0.0)); + timer_on(timer, period, timer->period <= 0.0); else timer_stop(timer); }