Reputation: 3337
I'm using
echo date('H:i:s')." this step time\n";
in order to know how much time needs for each function in order to be executed.
How can I know the time with microseconds also?
Upvotes: 4
Views: 8693
Reputation: 342655
Just to add, there's PHP's microtime() function, which can be used like this:
$time_start = microtime(true);
//do stuff here
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "It took $time seconds\n";
Upvotes: 9
Reputation: 4745
u Microseconds (added in PHP 5.2.2)
Take a look at http://no.php.net/manual/en/function.date.php for more information.
Upvotes: 4