Menu
Hi is there some sort of timing function that starts at zero or will I have to use microtime() and subtract the difference. Here’s what I am trying to do.
[code=php]
some_function(); //I want to know how long this takes.
// I guess you could do the following and subtract the difference
$start = microtime();
some_function();
$stop = microtime();
// But is there a stopwatch like function (in milliseconds) or could I build one
stopwatch(‘start’);
some_function();
stopwatch(‘stop’);
$elapsed_time = stopwatch(‘read’);