From 24345339421493cdacdbaae0248c3928ea9404c2 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 18 Nov 2025 12:41:40 +0800
Subject: [PATCH] update proc.h and utils.h
---
project/booster/proc.h | 42 +-----------------------------------------
1 files changed, 1 insertions(+), 41 deletions(-)
diff --git a/project/booster/util_proc.h b/project/booster/proc.h
similarity index 73%
rename from project/booster/util_proc.h
rename to project/booster/proc.h
index 22a5fd7..7ee5113 100644
--- a/project/booster/util_proc.h
+++ b/project/booster/proc.h
@@ -2,7 +2,7 @@
* Copyright: (C) 2020 LingYun IoT System Studio
* All rights reserved.
*
- * Filename: util_proc.h
+ * Filename: proc.h
* Description: This head file is for Linux process/thread API
*
* Version: 1.0.0(7/06/2012~)
@@ -15,7 +15,6 @@
#define __UTIL_PROC_H_
#include <signal.h>
-#include <time.h>
#define PID_ASCII_SIZE 11
@@ -62,44 +61,5 @@
/* get daemon process ID from $pid_file */
extern pid_t get_daemon_pid(const char *pid_file);
-
-/* +------------------------+
- * | inline functions API |
- * +------------------------+*/
-static inline void msleep(unsigned long ms)
-{
- struct timespec cSleep;
- unsigned long ulTmp;
-
- cSleep.tv_sec = ms / 1000;
- if (cSleep.tv_sec == 0)
- {
- ulTmp = ms * 10000;
- cSleep.tv_nsec = ulTmp * 100;
- }
- else
- {
- cSleep.tv_nsec = 0;
- }
-
- nanosleep(&cSleep, 0);
- 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