summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-07 23:23:51 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-07 23:23:51 +0000
commitd0be2c43ed83f35803d1d4d2b8561b64d569c879 (patch)
treeb49efb3eadf224b6114dae6073fa840cfda866b0 /time
parent8c063930f7d870894370bcb3f6635be794da7028 (diff)
downloadlibapr-d0be2c43ed83f35803d1d4d2b8561b64d569c879.tar.gz
Add a new ap_sleep function for apr. This basically sleeps for a specified
number of microseconds. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r--time/unix/time.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/time/unix/time.c b/time/unix/time.c
index 20344ac47..05bed7026 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -247,7 +247,13 @@ ap_status_t ap_put_os_exp_time(ap_exploded_time_t *aprtime,
return APR_SUCCESS;
}
-
+void ap_sleep(ap_time_t t)
+{
+ struct timeval tv;
+ tv.tv_usec = t % AP_USEC_PER_SEC;
+ tv.tv_sec = t / AP_USEC_PER_SEC;
+ select(0, NULL, NULL, NULL, &tv);
+}
#ifdef OS2
#define INCL_DOS