関数 timer_stop()
2014/11/25
タイマーストップ 関数を定義
定義ファイル :/blog/wp-includes/load.php
1 2 3 4 5 6 7 8 9 | function timer_stop( $display = 0, $precision = 3 ) { global $timestart, $timeend; $timeend = microtime( true ); $timetotal = $timeend - $timestart; $r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision ); if ( $display ) echo $r; return $r; } |
変数 グローバル宣言
$timestart
$timeend
関数
microtime() 現在の Unix タイムスタンプをマイクロ秒まで返す
function_exists() 指定した関数が定義されている場合に TRUE を返す
number_format_i18n() 数値を1000位毎にグループ化して国際化対応にフォーマットする
number_format() 数字を千位毎にグループ化してフォーマットする