diff options
author | Brian Pane <brianp@apache.org> | 2002-07-05 00:11:11 +0000 |
---|---|---|
committer | Brian Pane <brianp@apache.org> | 2002-07-05 00:11:11 +0000 |
commit | dedf6a446019685272311eb4fe49b5967499fa5f (patch) | |
tree | 501f9e952feadeba53f5bc925256701c9479fe24 /test/testshmconsumer.c | |
parent | cbfaf96ffd3901ab7cc4dd74351ebf5fe323169c (diff) | |
download | apr-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.c | 5 |
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"); } |