]> git.neil.brown.name Git - edlib.git/commitdiff
Disable pane_too_long() with edlib_timing_allowed = False.
authorNeilBrown <neil@brown.name>
Sun, 2 Jul 2023 10:29:24 +0000 (20:29 +1000)
committerNeilBrown <neil@brown.name>
Wed, 12 Jul 2023 22:17:52 +0000 (08:17 +1000)
edlib_timing_allowed = False
now disables pane_too_long() too.

Signed-off-by: NeilBrown <neil@brown.name>
core.h

diff --git a/core.h b/core.h
index 7ca999b1db3739ebcee63b91f25d2acdb3d675e4..ccd3dc69f97d864f7c335f19ce747c3891d77b92 100644 (file)
--- 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)