Ticket #16753: 16753.2.patch
| File 16753.2.patch, 2.1 KB (added by , 15 years ago) |
|---|
-
wp-content/plugins/akismet/akismet.php
202 202 } 203 203 204 204 function akismet_microtime() { 205 $mtime = explode( ' ', microtime() ); 206 return $mtime[1] + $mtime[0]; 205 return microtime( true ); 207 206 } 208 207 209 208 // log an event for a given comment, storing it in comment_meta -
wp-includes/load.php
186 186 */ 187 187 function timer_start() { 188 188 global $timestart; 189 $mtime = explode( ' ', microtime() ); 190 $timestart = $mtime[1] + $mtime[0]; 189 $timestart = microtime( true ); 191 190 return true; 192 191 } 193 192 … … 217 216 */ 218 217 function timer_stop( $display = 0, $precision = 3 ) { // if called like timer_stop(1), will echo $timetotal 219 218 global $timestart, $timeend; 220 $mtime = microtime(); 221 $mtime = explode( ' ', $mtime ); 222 $timeend = $mtime[1] + $mtime[0]; 219 $timeend = microtime( true ); 223 220 $timetotal = $timeend - $timestart; 224 221 $r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision ); 225 222 if ( $display ) -
wp-includes/wp-db.php
1444 1444 * @return true 1445 1445 */ 1446 1446 function timer_start() { 1447 $mtime = explode( ' ', microtime() ); 1448 $this->time_start = $mtime[1] + $mtime[0]; 1447 $this->time_start = microtime( true ); 1449 1448 return true; 1450 1449 } 1451 1450 … … 1457 1456 * @return int Total time spent on the query, in milliseconds 1458 1457 */ 1459 1458 function timer_stop() { 1460 $mtime = explode( ' ', microtime() ); 1461 $time_end = $mtime[1] + $mtime[0]; 1462 $time_total = $time_end - $this->time_start; 1463 return $time_total; 1459 $time_total = microtime( true ) - $this->time_start; 1460 return (int) $time_total; 1464 1461 } 1465 1462 1466 1463 /**