From c05013206538d7e54305c155525fcbb2163f4086 Mon Sep 17 00:00:00 2001 From: Utkarsh Verma Date: Fri, 15 Oct 2021 10:51:47 +0530 Subject: [PATCH] Poll every 100ms --- main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.c b/main.c index 6313471..52bd36d 100644 --- a/main.c +++ b/main.c @@ -197,6 +197,10 @@ void statusLoop() { } if (eventCount) writeStatus(); + + // Poll every 100ms + struct timespec toSleep = {0, 100000L}; + nanosleep(&toSleep, &toSleep); } }