summaryrefslogtreecommitdiffstats
path: root/srUtils.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-28 16:05:11 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-28 16:05:11 +0000
commitad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88 (patch)
treecab86071e8c87243ce19fa768b7b3b874a36654c /srUtils.c
parent6780beb633929cb174fc109531b47362ac487f21 (diff)
downloadrsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.tar.gz
rsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.tar.xz
rsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.zip
implemented the $ActionResumeRetryCount config directive
Diffstat (limited to 'srUtils.c')
-rwxr-xr-xsrUtils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/srUtils.c b/srUtils.c
index e15456a4..6da1010d 100755
--- a/srUtils.c
+++ b/srUtils.c
@@ -373,6 +373,22 @@ mutexCancelCleanup(void *arg)
}
+/* rsSleep() - a fairly portable way to to sleep. It
+ * will wake up when
+ * a) the wake-time is over
+ * rgerhards, 2008-01-28
+ */
+void
+srSleep(int iSeconds, int iuSeconds)
+{
+ struct timeval tvSelectTimeout;
+
+ BEGINfunc
+ tvSelectTimeout.tv_sec = iSeconds;
+ tvSelectTimeout.tv_usec = iuSeconds; /* micro seconds */
+ select(0, NULL, NULL, NULL, &tvSelectTimeout);
+ ENDfunc
+}
/*
* vi:set ai:
*/