mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Check-in of, yet uncomplete, PEAR/Benchmark_Timer class documentation.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51383 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f73e436d2b
commit
91c97f1d6a
1 changed files with 48 additions and 0 deletions
48
pear/benchmark_timer.xml
Normal file
48
pear/benchmark_timer.xml
Normal file
|
@ -0,0 +1,48 @@
|
|||
<refentry id="class.benchmark-timer">
|
||||
<refnamediv>
|
||||
<refname>Benchmark_Timer</refname>
|
||||
<refpurpose>Timing script execution</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<synopsis>...</synopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<simpara>
|
||||
...
|
||||
</simpara>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<example id="example.pear.benchmark.timer">
|
||||
<programlisting role="php">
|
||||
require_one 'Benchmark/Timer.php';
|
||||
$timer = new Benchmark_Timer;
|
||||
|
||||
$timer->setMarker('start of for() loop');
|
||||
for ($i = 0; $i < 1000; $i++) { /* ... */ }
|
||||
$timer->setMarker('end of for() loop');
|
||||
|
||||
echo 'The for() loop took ' .
|
||||
$timer->timeElapsed('start of for() loop', 'end of for() loop');
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.benchmark-timer.start">
|
||||
<refnamediv>
|
||||
<refname>start</refname>
|
||||
<refpurpose>Set a default marker, called 'start'.</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<synopsis>...</synopsis>
|
||||
</refsynopsisdiv>
|
||||
</refentry>
|
||||
<refentry id="function.benchmark-timer.stop">
|
||||
<refnamediv>
|
||||
<refname>stop</refname>
|
||||
<refpurpose>Set a default marker, called 'stop'.</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<synopsis>...</synopsis>
|
||||
</refsynopsisdiv>
|
||||
</refentry>
|
Loading…
Reference in a new issue