diff options
author | Brian Pane <brianp@apache.org> | 2002-03-17 06:13:12 +0100 |
---|---|---|
committer | Brian Pane <brianp@apache.org> | 2002-03-17 06:13:12 +0100 |
commit | e3bfcb14303575b6d57237ed6f2d45a7d86a1e8a (patch) | |
tree | 3be7519206a1ee348d9a52fc70af96307b4637d2 /include/util_time.h | |
parent | fix a compile error (diff) | |
download | apache2-e3bfcb14303575b6d57237ed6f2d45a7d86a1e8a.tar.xz apache2-e3bfcb14303575b6d57237ed6f2d45a7d86a1e8a.zip |
Use the "recent time" cache to optimize timestamp generation for
the httpd error log
Background: According to some profile data that we collected on Solaris,
half the run time of ap_log_rerror() was spent in localtime(3). With
this change, the recent-time cache ensures that the error logger won't
cause more than one localtime() call per second, no matter how high the
error rate is.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93977 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/util_time.h')
-rw-r--r-- | include/util_time.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/util_time.h b/include/util_time.h index d595170716..1852f89fe5 100644 --- a/include/util_time.h +++ b/include/util_time.h @@ -102,6 +102,13 @@ AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t *tm, apr_time_t t); +/** + * format a recent timestamp in the ctime() format. + * @param date_str String to write to. + * @param t the time to convert + */ +AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t); + #ifdef __cplusplus } #endif |