diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 16:05:11 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 16:05:11 +0000 |
commit | ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88 (patch) | |
tree | cab86071e8c87243ce19fa768b7b3b874a36654c /srUtils.c | |
parent | 6780beb633929cb174fc109531b47362ac487f21 (diff) | |
download | rsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.tar.gz rsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.tar.xz rsyslog-ad2f1c7e6d806203a6cdca8cf6ea99380c3b2b88.zip |
implemented the $ActionResumeRetryCount config directive
Diffstat (limited to 'srUtils.c')
-rwxr-xr-x | srUtils.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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: */ |