- microtime: documentation ( source)
- round: documentation ( source)
<?php
// Everything you enter here will be executed by our servers. Try it!
for ($startTimeMs = currentTimeMs(), $i = 0; $i < 100; $i++) {
//usleep(1);
echo (currentTimeMs() - $startTimeMs) . ' ';
}
function currentTimeMs() {
return round(microtime(true) * 1000000);
}