summaryrefslogtreecommitdiff
path: root/test/testshmconsumer.c
diff options
context:
space:
mode:
authorbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-07-05 00:11:11 +0000
committerbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-07-05 00:11:11 +0000
commit8e475bdd7c440e86590e598e6a8d93d49a4d205a (patch)
tree501f9e952feadeba53f5bc925256701c9479fe24 /test/testshmconsumer.c
parent67db4d0c5731c9b136a2b20e86c1b1b494533d2a (diff)
downloadlibapr-8e475bdd7c440e86590e598e6a8d93d49a4d205a.tar.gz
use new time conversion macros in place of APR_USEC_PER_SEC
git-svn-id: http://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");
}