diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2010-11-06 17:14:21 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2010-11-06 17:14:21 +0000 |
| commit | f89effd2a83de2b1d6381f9b9403a8328e0998b6 (patch) | |
| tree | 346940b3c9671b154de6f45a9afc1d0dc75f5c8c /sapi | |
| parent | d31e4e7f8e78f0ed4497de9ef4a8f3461d2ed6b3 (diff) | |
| download | php-git-f89effd2a83de2b1d6381f9b9403a8328e0998b6.tar.gz | |
Updated _SERVER['REQUEST_TIME'] to include microsecond precision.
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/apache/mod_php5.c | 4 | ||||
| -rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 4 | ||||
| -rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 4 | ||||
| -rw-r--r-- | sapi/nsapi/nsapi.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 1d858a5bc1..10b30ee5ec 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -438,9 +438,9 @@ static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC) /* {{{ php_apache_get_request_time */ -static time_t php_apache_get_request_time(TSRMLS_D) +static double php_apache_get_request_time(TSRMLS_D) { - return ((request_rec *)SG(server_context))->request_time; + return (double) ((request_rec *)SG(server_context))->request_time; } /* }}} */ diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 5aa798c53d..c63ada0ba1 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -308,10 +308,10 @@ php_apache_disable_caching(ap_filter_t *f) return OK; } -static time_t php_apache_sapi_get_request_time(TSRMLS_D) +static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return apr_time_sec(ctx->r->request_time); + return apr_time_as_msec(ctx->r->request_time); } extern zend_module_entry php_apache_module; diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index f8eb2d47ea..de9228069b 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -335,10 +335,10 @@ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r TSRMLS_DC) } } -static time_t php_apache_sapi_get_request_time(TSRMLS_D) +static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); - return apr_time_sec(ctx->r->request_time); + return apr_time_as_msec(ctx->r->request_time); } extern zend_module_entry php_apache_module; diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index eaa20f7fff..5847c6fe1c 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -784,7 +784,7 @@ static void nsapi_log_message(char *message TSRMLS_DC) } } -static time_t sapi_nsapi_get_request_time(TSRMLS_D) +static double sapi_nsapi_get_request_time(TSRMLS_D) { return REQ_TIME( ((nsapi_request_context *)SG(server_context))->rq ); } |
