From: NeilBrown Date: Sun, 2 Jul 2023 10:29:24 +0000 (+1000) Subject: Disable pane_too_long() with edlib_timing_allowed = False. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=ebf7435b754a9fed523872a19ec6b7ded44ec41d;p=edlib.git Disable pane_too_long() with edlib_timing_allowed = False. edlib_timing_allowed = False now disables pane_too_long() too. Signed-off-by: NeilBrown --- diff --git a/core.h b/core.h index 7ca999b1..ccd3dc69 100644 --- a/core.h +++ b/core.h @@ -97,8 +97,11 @@ static inline unsigned int ts_to_ms(struct timespec *ts safe) static inline bool pane_too_long(struct pane *p safe, unsigned int msec) { + extern bool edlib_timing_allowed; struct timespec ts; unsigned int duration; + if (!edlib_timing_allowed) + return False; clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); duration = ts_to_ms(&ts) - p->timestamp; if (msec < 100)