From c640c46b31b4c06968f5d2a54da65dda31f3f1c5 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sun, 5 Aug 2012 03:53:37 +0000 Subject: [PATCH] show request time in module info git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1127 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- mod_cacher/xc_cacher.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod_cacher/xc_cacher.c b/mod_cacher/xc_cacher.c index 04d43c5..804a1b8 100644 --- a/mod_cacher/xc_cacher.c +++ b/mod_cacher/xc_cacher.c @@ -3194,10 +3194,17 @@ static PHP_MINFO_FUNCTION(xcache_cacher) /* {{{ */ php_info_print_table_row(2, "XCache Cacher Module", "enabled"); php_info_print_table_row(2, "Readonly Protection", xc_readonly_protection ? "enabled" : "disabled"); #ifdef ZEND_ENGINE_2_1 + ptr = php_format_date("Y-m-d H:i:s", sizeof("Y-m-d H:i:s") - 1, XG(request_time), 1 TSRMLS_CC); + php_info_print_table_row(2, "Page Request Time", ptr); + efree(ptr); + ptr = php_format_date("Y-m-d H:i:s", sizeof("Y-m-d H:i:s") - 1, xc_init_time, 1 TSRMLS_CC); php_info_print_table_row(2, "Cache Init Time", ptr); efree(ptr); #else + snprintf(buf, sizeof(buf), "%lu", (long unsigned) XG(request_time)); + php_info_print_table_row(2, "Page Request Time", buf); + snprintf(buf, sizeof(buf), "%lu", (long unsigned) xc_init_time); php_info_print_table_row(2, "Cache Init Time", buf); #endif