From e1c45b607ef7c6cddebe93d96e8f6e0cd4987da6 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 18 Nov 2025 10:58:09 +0800
Subject: [PATCH] update config logger

---
 project/booster/util_proc.h |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/project/booster/util_proc.h b/project/booster/util_proc.h
index 89856c6..22a5fd7 100644
--- a/project/booster/util_proc.h
+++ b/project/booster/util_proc.h
@@ -86,4 +86,20 @@
     return ;
 }
 
+static inline int check_timeout(time_t *last_time, int interval)
+{
+    int                  timeout = 0;
+    time_t               now;
+
+    time(&now);
+
+    if( difftime(now, *last_time)>interval )
+    {
+        timeout = 1;
+        *last_time = now;
+    }
+
+    return timeout;
+}
+
 #endif

--
Gitblit v1.9.1