summaryrefslogtreecommitdiff
path: root/test/testshmconsumer.c
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-07-05 00:11:11 +0000
committerBrian Pane <brianp@apache.org>2002-07-05 00:11:11 +0000
commitdedf6a446019685272311eb4fe49b5967499fa5f (patch)
tree501f9e952feadeba53f5bc925256701c9479fe24 /test/testshmconsumer.c
parentcbfaf96ffd3901ab7cc4dd74351ebf5fe323169c (diff)
downloadapr-dedf6a446019685272311eb4fe49b5967499fa5f.tar.gz
use new time conversion macros in place of APR_USEC_PER_SEC
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testshmconsumer.c')
-rw-r--r--test/testshmconsumer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/testshmconsumer.c b/test/testshmconsumer.c
index d01467faa..673516624 100644
--- a/test/testshmconsumer.c
+++ b/test/testshmconsumer.c
@@ -81,7 +81,8 @@ static void msgwait(int sleep_sec, int first_box, int last_box)
{
int i;
apr_time_t start = apr_time_now();
- while (apr_time_now() - start < sleep_sec * APR_USEC_PER_SEC) {
+ apr_interval_time_t sleep_duration = apr_time_from_sec(sleep_sec);
+ while (apr_time_now() - start < sleep_duration) {
for (i = first_box; i < last_box; i++) {
if (boxes[i].msgavail) {
fprintf(stdout, "Consumer: received a message in box %d, message was: %s\n",
@@ -89,7 +90,7 @@ static void msgwait(int sleep_sec, int first_box, int last_box)
boxes[i].msgavail = 0; /* reset back to 0 */
}
}
- apr_sleep(1*APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(1));
}
fprintf(stdout, "Consumer: done waiting on mailboxes...\n");
}