Home >Backend Development >PHP Tutorial >php calculate program running time

php calculate program running time

WBOY
WBOYOriginal
2016-07-29 09:06:371050browse

The

microtime() function returns the current Unix timestamp and microseconds.

<code><span>echo</span>(microtime());
<span>0.47813000</span><span>1451273280</span></code>

microtime(true)returns a floating point number
Calculate running time code:

<code><span>$startTime</span> = microtime(<span>true</span>);
<span>$endTime</span> = microtime(<span>true</span>);
<span>$runTime</span> = (<span>$endTime</span>-<span>$startTime</span>)*<span>1000</span> . <span>' ms'</span>;</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the PHP calculation program running time, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn