From 074aa6aec7449a7bb88be96d042c6befda8ea3ec Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Thu, 8 Jun 2000 01:47:21 +0000 Subject: [PATCH] Fix some problems with the time commit. I guess mod_unique_id isn't turned on by default, which is why my last build's didn't catch this. I'll be more careful in the future. Submitted by: Greg Stein git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85464 13f79535-47bb-0310-9956-ffa450edef68 --- modules/metadata/mod_unique_id.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index fb6fa019e5..7430dfd85c 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -231,13 +231,13 @@ static void unique_id_global_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptem * next second. */ tv = ap_now(); - ap_sleep( + ap_sleep(tv); } static void unique_id_child_init(ap_pool_t *p, server_rec *s) { pid_t pid; - time_t tv; + ap_time_t tv; /* * Note that we use the pid because it's possible that on the same @@ -270,6 +270,9 @@ static void unique_id_child_init(ap_pool_t *p, server_rec *s) * going backwards in time. */ tv = ap_now(); + /* Some systems have very low variance on the low end of their system + * counter, defend against that. + */ cur_unique_id.counter = tv % APR_USEC_PER_SEC / 10; /*