summaryrefslogtreecommitdiffstats
path: root/srUtils.c
diff options
context:
space:
mode:
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:
*/