Skip to content

Commit 8c044c8

Browse files
committed
Removed unused exec_time & fetch_time in zend_accelerator_module
1 parent 13d63a9 commit 8c044c8

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

ext/opcache/zend_accelerator_module.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,6 @@ static int accelerator_get_scripts(zval *return_value)
599599
zval persistent_script_report;
600600
zend_accel_hash_entry *cache_entry;
601601
struct tm *ta;
602-
struct timeval exec_time;
603-
struct timeval fetch_time;
604602

605603
if (!ZCG(accelerator_enabled) || accelerator_shm_read_lock() != SUCCESS) {
606604
return 0;
@@ -630,8 +628,6 @@ static int accelerator_get_scripts(zval *return_value)
630628
if (ZCG(accel_directives).validate_timestamps) {
631629
add_assoc_long(&persistent_script_report, "timestamp", (zend_long)script->timestamp);
632630
}
633-
timerclear(&exec_time);
634-
timerclear(&fetch_time);
635631

636632
add_assoc_long(&persistent_script_report, "revalidate", (zend_long)script->dynamic_members.revalidate);
637633

ext/openssl/xp_ssl.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2350,14 +2350,12 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val
23502350

23512351
if (value == -1) {
23522352
if (sslsock->s.timeout.tv_sec == -1) {
2353-
tv.tv_sec = (time_t)FG(default_socket_timeout);
2354-
tv.tv_usec = 0;
2353+
php_timei2val(FG(default_socket_timeout), tv);
23552354
} else {
23562355
tv = sslsock->connect_timeout;
23572356
}
23582357
} else {
2359-
tv.tv_sec = value;
2360-
tv.tv_usec = 0;
2358+
php_timei2val(value, tv);
23612359
}
23622360

23632361
if (sslsock->s.socket == -1) {
@@ -2669,8 +2667,7 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, size_t protolen,
26692667

26702668
sslsock->s.is_blocked = 1;
26712669
/* this timeout is used by standard stream funcs, therefore it should use the default value */
2672-
sslsock->s.timeout.tv_sec = (time_t)FG(default_socket_timeout);
2673-
sslsock->s.timeout.tv_usec = 0;
2670+
php_timei2val(FG(default_socket_timeout), sslsock->s.timeout);
26742671

26752672
/* use separate timeout for our private funcs */
26762673
sslsock->connect_timeout.tv_sec = timeout->tv_sec;

ext/soap/php_http.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
#include "php_time.h"
20+
1921
#include "php_soap.h"
2022
#include "ext/hash/php_hash.h" /* For php_hash_bin2hex() */
2123

ext/standard/microtime.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#ifdef HAVE_SYS_TYPES_H
2121
#include <sys/types.h>
2222
#endif
23+
#ifdef PHP_WIN32
24+
#include "win32/getrusage.h"
25+
#endif
2326
#ifdef HAVE_SYS_RESOURCE_H
2427
#include <sys/resource.h>
2528
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy