diff options
author | Ryan Bloom <rbb@apache.org> | 2000-06-07 23:23:51 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2000-06-07 23:23:51 +0000 |
commit | 24951e19dc60dc0bc20602bbd271a1fe022e8583 (patch) | |
tree | b49efb3eadf224b6114dae6073fa840cfda866b0 /time | |
parent | f0a821c07b63d7033f38e5e750ad89994f80ec4d (diff) | |
download | apr-24951e19dc60dc0bc20602bbd271a1fe022e8583.tar.gz |
Add a new ap_sleep function for apr. This basically sleeps for a specified
number of microseconds.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 8 |
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 |