summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--memory/unix/apr_pools.c2
-rw-r--r--network_io/beos/poll.c4
-rw-r--r--network_io/unix/poll.c4
-rw-r--r--network_io/win32/poll.c4
-rw-r--r--test/testfile.c2
-rw-r--r--test/testshmproducer.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index cddd1b987..82a9f7b2e 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -2051,7 +2051,7 @@ static void free_proc_chain(struct process_chain *procs)
/* Sleep only if we have to... */
if (need_timeout)
- apr_sleep(3 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(3));
/* OK, the scripts we just timed out for have had a chance to clean up
* --- now, just get rid of them, and also clean up the system accounting
diff --git a/network_io/beos/poll.c b/network_io/beos/poll.c
index 965156122..d794ee77c 100644
--- a/network_io/beos/poll.c
+++ b/network_io/beos/poll.c
@@ -166,8 +166,8 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = timeout / APR_USEC_PER_SEC;
- tv.tv_usec = timeout % APR_USEC_PER_SEC;
+ tv.tv_sec = apr_time_sec(timeout);
+ tv.tv_usec = apr_time_usec(timeout);
tvptr = &tv;
}
diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c
index 99be46fb8..5c15e0150 100644
--- a/network_io/unix/poll.c
+++ b/network_io/unix/poll.c
@@ -289,8 +289,8 @@ apr_status_t apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = timeout / APR_USEC_PER_SEC;
- tv.tv_usec = timeout % APR_USEC_PER_SEC;
+ tv.tv_sec = apr_time_sec(timeout);
+ tv.tv_usec = apr_time_usec(timeout);
tvptr = &tv;
}
diff --git a/network_io/win32/poll.c b/network_io/win32/poll.c
index de8ccccff..d9c8cd1d2 100644
--- a/network_io/win32/poll.c
+++ b/network_io/win32/poll.c
@@ -134,8 +134,8 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = (long)(timeout / APR_USEC_PER_SEC);
- tv.tv_usec = (long)(timeout % APR_USEC_PER_SEC);
+ tv.tv_sec = (long)apr_time_sec(timeout);
+ tv.tv_usec = (long)apr_time_usec(timeout);
tvptr = &tv;
}
rv = select(500, /* ignored on Windows */
diff --git a/test/testfile.c b/test/testfile.c
index a189dfd6c..25176baeb 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -157,7 +157,7 @@ int main(void)
apr_poll_socket_add(sdset, testsock, APR_POLLIN);
num = 1;
STD_TEST_NEQ(" Checking for incoming data",
- apr_poll(sdset, &num, 1 * APR_USEC_PER_SEC))
+ apr_poll(sdset, &num, apr_time_from_sec(1)));
if (num == 0) {
printf("** This platform doesn't return readability on a regular file.**\n");
}
diff --git a/test/testshmproducer.c b/test/testshmproducer.c
index 94e11e41b..dde0d2e84 100644
--- a/test/testshmproducer.c
+++ b/test/testshmproducer.c
@@ -118,7 +118,7 @@ int main(void)
/* produce messages on all of the boxes, in descending order */
for (i = N_BOXES - 1; i > 0; i--) {
msgput(i, "Sending a message\n");
- apr_sleep(1*APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(1));
}
printf("Producer detaching from name-based shared memory....");