File tree Expand file tree Collapse file tree
hrtime-performancecounter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: 463a6ab5443c687b0d386860cedb4b146b9e956c Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
3-
4- <book xml : id = " book.hrtime " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: fernandowobeto Status: ready -->
3+ <!-- CREDITS: fernandowobeto -->
4+ <book xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " book.hrtime " >
55 <?phpdoc extension-membership =" pecl" ?>
66 <title >Temporização de alta resolução</title >
77 <titleabbrev >HRTime</titleabbrev >
88
99 <preface xml : id =" intro.hrtime" >
1010 &reftitle.intro;
11- <para >
11+ <simpara >
1212 A extensão HRTime implementa uma classe StopWatch de alta resolução. Ela usa as
1313 melhores APIs possíveis em diferentes plataformas, o que traz resolução de até nanossegundos. Ela também torna possível implementar
1414 um cronômetro personalizado usando tiques de baixo nível entregues pelas APIs subjacentes.
15- </para >
15+ </simpara >
1616 <note >
1717 <simpara >
1818 A partir do PHP 7.3.0, a função relacionada <function >hrtime</function > faz parte
2828 &reference.hrtime.hrtime.unit;
2929
3030</book >
31-
3231<!-- Keep this comment at the end of the file
3332Local variables:
3433mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: 20b247bdcf6ff0de38649f059a830d7c62123dcc Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
3-
4- <section xml : id = " hrtime.installation " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: fernandowobeto Status: ready -->
3+ <!-- CREDITS: fernandowobeto -->
4+ <section xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime.installation " >
55 &reftitle.install;
66
7- <para >
7+ <simpara >
88 Use <option role =" configure" >--with-hrtime[=DIR]</option > ao compilar o PHP.
9- </para >
9+ </simpara >
1010
11- <para >
11+ <simpara >
1212 Usuários de Windows devem incluir <filename >php_hrtime.dll</filename > no &php.ini;
13- </para >
13+ </simpara >
1414
1515</section >
16-
17-
1816<!-- Keep this comment at the end of the file
1917Local variables:
2018mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: dc49857b7c13a7d4fdd7b258827de941f4e3d297 Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
3- <chapter xml : id =" hrtime.examples" xmlns =" http://docbook.org/ns/docbook" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: fernandowobeto Status: ready -->
3+ <!-- CREDITS: fernandowobeto -->
4+ <chapter xmlns =" http://docbook.org/ns/docbook" xml : id =" hrtime.examples" >
45 &reftitle.examples;
56 <section xml : id =" hrtime.example.basic" >
67 <title >Uso básico</title >
7- <para >
8+ <simpara >
89 O exemplo ilustra o uso básico da classe StopWatch
9- </para >
10+ </simpara >
1011 <example >
1112 <title >Meça a execução de vários blocos de código e obtenha o total</title >
1213 <programlisting role =" php" >
@@ -38,7 +39,6 @@ $elapsed_total = $c->getElapsedTime(HRTime\Unit::NANOSECOND);
3839 </example >
3940 </section >
4041</chapter >
41-
4242<!-- Keep this comment at the end of the file
4343Local variables:
4444mode: sgml
@@ -59,4 +59,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
5959vim: et tw=78 syn=sgml
6060vi: ts=1 sw=1
6161-->
62-
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: 18f9cbcbc404fa3161104e4f3969531f686457af Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-performancecounter.getfrequency " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-performancecounter.getfrequency " >
55 <refnamediv >
66 <refname >HRTime\PerformanceCounter::getFrequency</refname >
77 <refpurpose >Frequência do temporizador em tiques por segundo</refpurpose >
1111 &reftitle.description;
1212 <methodsynopsis >
1313 <modifier >public</modifier > <modifier >static</modifier > <type >int</type ><methodname >HRTime\PerformanceCounter::getFrequency</methodname >
14- <void />
14+ <void />
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 Retorna a frequência do temporizador em tiques por segundo. Este valor é constante após a
1818 inicialização em quase todos os sistemas operacionais.
19- </para >
19+ </simpara >
2020
2121 </refsect1 >
2222
2727
2828 <refsect1 role =" returnvalues" >
2929 &reftitle.returnvalues;
30- <para >
30+ <simpara >
3131 Retorna um &integer; indicando a frequência do temporizador.
32- </para >
32+ </simpara >
3333 </refsect1 >
3434
3535
3636</refentry >
37-
3837<!-- Keep this comment at the end of the file
3938Local variables:
4039mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: 6ccdace91b727bd0f32214d1670a5e765fd28a09 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-performancecounter.getticks " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-performancecounter.getticks " >
55 <refnamediv >
66 <refname >HRTime\PerformanceCounter::getTicks</refname >
77 <refpurpose >Tiques atuais do sistema</refpurpose >
1111 &reftitle.description;
1212 <methodsynopsis >
1313 <modifier >public</modifier > <modifier >static</modifier > <type >int</type ><methodname >HRTime\PerformanceCounter::getTicks</methodname >
14- <void />
14+ <void />
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 Retorna a contagem de tiques.
18- </para >
18+ </simpara >
1919 </refsect1 >
2020
2121 <refsect1 role =" parameters" >
2525
2626 <refsect1 role =" returnvalues" >
2727 &reftitle.returnvalues;
28- <para >
28+ <simpara >
2929 Retorna um &integer; indicando a contagem de tiques.
30- </para >
30+ </simpara >
3131 </refsect1 >
3232
3333</refentry >
34-
3534<!-- Keep this comment at the end of the file
3635Local variables:
3736mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: 18f9cbcbc404fa3161104e4f3969531f686457af Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-performancecounter.gettickssince " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-performancecounter.gettickssince " >
55 <refnamediv >
66 <refname >HRTime\PerformanceCounter::getTicksSince</refname >
77 <refpurpose >Tiques decorridos desde um valor informado</refpurpose >
1313 <modifier >public</modifier > <modifier >static</modifier > <type >int</type ><methodname >HRTime\PerformanceCounter::getTicksSince</methodname >
1414 <methodparam ><type >int</type ><parameter >start</parameter ></methodparam >
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 Retorna a contagem de tiques decorridos desde o valor de início informado.
18- </para >
18+ </simpara >
1919
2020 </refsect1 >
2121
2525 <varlistentry >
2626 <term ><parameter >start</parameter ></term >
2727 <listitem >
28- <para >
28+ <simpara >
2929 Valor de início da contagem dos tiques.
30- </para >
30+ </simpara >
3131 </listitem >
3232 </varlistentry >
3333 </variablelist >
3434 </refsect1 >
3535
3636 <refsect1 role =" returnvalues" >
3737 &reftitle.returnvalues;
38- <para >
38+ <simpara >
3939 Retorna um &integer; indicando a contagem de tiques.
40- </para >
40+ </simpara >
4141 </refsect1 >
4242
4343
4444</refentry >
45-
4645<!-- Keep this comment at the end of the file
4746Local variables:
4847mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-stopwatch.getelapsedticks " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-stopwatch.getelapsedticks " >
55 <refnamediv >
66 <refname >HRTime\StopWatch::getElapsedTicks</refname >
77 <refpurpose >Obtém os tiques decorridos para todos os intervalos</refpurpose >
1111 &reftitle.description;
1212 <methodsynopsis >
1313 <modifier >public</modifier > <type >int</type ><methodname >HRTime\StopWatch::getElapsedTicks</methodname >
14- <void />
14+ <void />
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 Obtém os tiques decorridos para todos os intervalos previamente fechados.
18- </para >
18+ </simpara >
1919
2020 </refsect1 >
2121
2626
2727 <refsect1 role =" returnvalues" >
2828 &reftitle.returnvalues;
29- <para >
29+ <simpara >
3030 Retorna um &integer; indicando os tiques decorridos.
31- </para >
31+ </simpara >
3232 </refsect1 >
3333
3434
3535</refentry >
36-
3736<!-- Keep this comment at the end of the file
3837Local variables:
3938mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: be295015d068095fc92880baef4e47038646adbd Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-stopwatch.getelapsedtime " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-stopwatch.getelapsedtime " >
55 <refnamediv >
66 <refname >HRTime\StopWatch::getElapsedTime</refname >
77 <refpurpose >Obtém o tempo decorrido para todos os intervalos</refpurpose >
1313 <modifier >public</modifier > <type >float</type ><methodname >HRTime\StopWatch::getElapsedTime</methodname >
1414 <methodparam choice =" opt" ><type >int</type ><parameter >unit</parameter ></methodparam >
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717
1818 Obtém o tempo decorrido para todos os intervalos previamente fechados.
19- </para >
19+ </simpara >
2020
2121 </refsect1 >
2222
2626 <varlistentry >
2727 <term ><parameter >unit</parameter ></term >
2828 <listitem >
29- <para >
29+ <simpara >
3030 Unidade de tempo representada por uma constante HRTime\Unit. O padrão é
3131 HRTime\Unit::SECOND.
32- </para >
32+ </simpara >
3333 </listitem >
3434 </varlistentry >
3535 </variablelist >
3636 </refsect1 >
3737
3838 <refsect1 role =" returnvalues" >
3939 &reftitle.returnvalues;
40- <para >
40+ <simpara >
4141 Retorna um &float; indicando o tempo decorrido.
4242
43- </para >
43+ </simpara >
4444 </refsect1 >
4545
4646
4747</refentry >
48-
4948<!-- Keep this comment at the end of the file
5049Local variables:
5150mode: sgml
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
3-
4- <refentry xml : id = " hrtime-stopwatch.getlastelapsedticks " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
2+ <!-- EN-Revision: 3e7e14916c28630bce69e65f539d27bb96a90066 Maintainer: leonardolara Status: ready -->
3+ <!-- CREDITS: leonardolara -->
4+ <refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " hrtime-stopwatch.getlastelapsedticks " >
55 <refnamediv >
66 <refname >HRTime\StopWatch::getLastElapsedTicks</refname >
77 <refpurpose >Obtém os tiques decorridos para o último intervalo</refpurpose >
1111 &reftitle.description;
1212 <methodsynopsis >
1313 <modifier >public</modifier > <type >int</type ><methodname >HRTime\StopWatch::getLastElapsedTicks</methodname >
14- <void />
14+ <void />
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 Obtém os tiques decorridos para o último intervalo previamente fechado.
18- </para >
18+ </simpara >
1919
2020 </refsect1 >
2121
2626
2727 <refsect1 role =" returnvalues" >
2828 &reftitle.returnvalues;
29- <para >
29+ <simpara >
3030 Retorna um &integer; indicando od tiques decorridos.
31- </para >
31+ </simpara >
3232 </refsect1 >
3333
3434
3535</refentry >
36-
3736<!-- Keep this comment at the end of the file
3837Local variables:
3938mode: sgml
You can’t perform that action at this time.
0 commit comments