Ticket #39163: medium.diff
File medium.diff, 960 bytes (added by , 7 years ago) |
---|
-
wp-includes/load.php
5 5 * @package WordPress 6 6 */ 7 7 8 // Compat for PHP < 5.4.0 9 if ( !isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ) 10 $_SERVER['REQUEST_TIME_FLOAT'] = microtime( true ); 11 8 12 /** 9 13 * Return the HTTP protocol sent by the server. 10 14 * … … 228 232 } 229 233 230 234 /** 235 * Get the time elapsed so far during this PHP script. 236 * 237 * REQUEST_TIME_FLOAT appeared in PHP 5.4.0. 238 * 239 * @since 240 * 241 * @return float Seconds since the PHP script started. 242 */ 243 function timer_float() { 244 return microtime( true ) - $_SERVER['REQUEST_TIME_FLOAT']; 245 } 246 247 /** 231 248 * Start the WordPress micro-timer. 232 249 * 233 250 * @since 0.71 … … 240 257 */ 241 258 function timer_start() { 242 259 global $timestart; 243 $timestart = microtime( true );260 $timestart = $_SERVER['REQUEST_TIME_FLOAT']; 244 261 return true; 245 262 } 246 263