1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php $timeStartMicroSec = microtime(true); usleep(1000); //1000 マイクロ秒スリープする $timeEndMicroSec = microtime(true); $timeLapseMicroSec = $timeEndMicroSec - $timeStartMicroSec; $timeLapseMilliSec = $timeLapseMicroSec * 1000; $timeLapseMilliSecRounded = round($timeLapseMilliSec, 4); echo "{$timeLapseMilliSecRounded} ミリ秒"; |
1 |
1.0641 ミリ秒 |