From d78242bd5e0028431bd983f7a48e74ecad6ee4dd Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Wed, 1 Apr 2026 20:46:40 +0200 Subject: enforce minimum of 2 samples --- watchdog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/watchdog.c b/watchdog.c index e547aae..12df687 100644 --- a/watchdog.c +++ b/watchdog.c @@ -16,6 +16,10 @@ #define WATCHDOG_BURST_END 90 // cpu time percentage considered the end of a burst #define WATCHDOG_SAMPLES 5 // how many samples a burst needs to persist for to be logged +#if WATCHDOG_SAMPLES < 2 +#error must consider at least 2 samples +#endif + // arbitrary limits, bump if necessary #define MAX_PROCESS 4096 #define DIRBUFFER_SIZE 262144 -- cgit v1.2.3