Zachariah
0
Q:

time now with milliseconds php

//Timing executation time of script
$startTime = microtime(true); //get time in micro seconds(1 millionth)
usleep(250); 
$endTime = microtime(true);

echo "milliseconds to execute:". ($endTime-$startTime)*1000;
1
$d = new DateTime();
echo $d->format("Y-m-d H:i:s.v"); // v : Milliseconds 
-1

New to Communities?

Join the community