]> granicus.if.org Git - apache/commitdiff
Fixed good. The modulos op should give us just that extra little bit we
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 15 Jul 2002 08:15:31 +0000 (08:15 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 15 Jul 2002 08:15:31 +0000 (08:15 +0000)
  need to be sure we sleep for a good long fraction of the second into the
  next second.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96059 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_unique_id.c

index abfc1516061744d41fd7111f1b4f404dbb1030df..d3fc26439d3f45c63f40e2483f69b584ab8079d1 100644 (file)
@@ -250,7 +250,7 @@ static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pt
      * But protecting against it is relatively cheap.  We just sleep into the
      * next second.
      */
-    apr_sleep(apr_time_from_sec(1) - apr_time_now());
+    apr_sleep(apr_time_from_sec(1) - (apr_time_now() % APR_USEC_PER_SEC));
     return OK;
 }