]> granicus.if.org Git - apache/commitdiff
Replaced APR_USEC_PER_SEC division with the new apr_time_sec() macro
authorBrian Pane <brianp@apache.org>
Sun, 30 Jun 2002 03:53:32 +0000 (03:53 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 30 Jun 2002 03:53:32 +0000 (03:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95915 13f79535-47bb-0310-9956-ffa450edef68

modules/loggers/mod_log_config.c

index c92945d3f47efc2831f72fcf60ef8de81f367bc8..1e9542b9030719ca3dbb30304913daf09632d8e3 100644 (file)
@@ -507,7 +507,7 @@ static const char *log_request_time(request_rec *r, char *a)
 #else
         apr_time_t request_time = r->request_time;
 #endif
-        unsigned t_seconds = (unsigned)(request_time / APR_USEC_PER_SEC);
+        unsigned t_seconds = (unsigned)apr_time_sec(request_time);
         unsigned i = t_seconds & TIME_CACHE_MASK;
         memcpy(cached_time, &(request_time_cache[i]), sizeof(*cached_time));
         if ((t_seconds != cached_time->t) ||
@@ -544,8 +544,8 @@ static const char *log_request_time(request_rec *r, char *a)
 
 static const char *log_request_duration(request_rec *r, char *a)
 {
-    return apr_psprintf(r->pool, "%qd", (apr_time_now() - r->request_time) 
-                                             / APR_USEC_PER_SEC);
+    apr_time_t duration = apr_time_now() - r->request_time;
+    return apr_psprintf(r->pool, "%qd", apr_time_sec(duration));
 }
 
 static const char *log_request_duration_microseconds(request_rec *r, char *a)