* XXX Jeff doesn't see how Apache is going to try to fork again since
* the exit code is APEXIT_CHILDFATAL
*/
- apr_sleep(10 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(10));
clean_child_exit(APEXIT_CHILDFATAL);
}
apr_os_thread_get(&listener_os_thread, ts->listener);
/* In case system resources are maxxed out, we don't want
Apache running away with the CPU trying to fork over and
over and over again if we exit. */
- apr_sleep(10 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(10));
clean_child_exit(APEXIT_CHILDFATAL);
}
threads_created++;
break;
}
/* wait for previous generation to clean up an entry */
- apr_sleep(1 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(1));
++loops;
if (loops % 120 == 0) { /* every couple of minutes */
if (prev_threads_created == threads_created) {
#endif
== 0) {
/* listener not dead yet */
- apr_sleep(APR_USEC_PER_SEC / 2);
+ apr_sleep(apr_time_make(0, 500000));
wakeup_listener();
++iter;
}
/* In case system resources are maxxed out, we don't want
Apache running away with the CPU trying to fork over and
over and over again if we exit. */
- apr_sleep(10 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(10));
clean_child_exit(APEXIT_CHILDFATAL);
}
/* In case system resources are maxxed out, we don't want
Apache running away with the CPU trying to fork over and
over and over again. */
- apr_sleep(10 * APR_USEC_PER_SEC);
+ apr_sleep(apr_time_from_sec(10));
return -1;
}
struct exploded_time_cache_element *cache,
int use_gmt)
{
- apr_int64_t seconds = t / APR_USEC_PER_SEC;
+ apr_int64_t seconds = apr_time_sec(t);
struct exploded_time_cache_element *cache_element =
&(cache[seconds % TIME_CACHE_SIZE]);
struct exploded_time_cache_element cache_element_snapshot;
memcpy(&(cache_element->xt), xt, sizeof(apr_time_exp_t));
cache_element->t_validate = seconds;
}
- xt->tm_usec = (int)(t % APR_USEC_PER_SEC);
+ xt->tm_usec = (int)apr_time_usec(t);
return APR_SUCCESS;
}