1
0
mirror of https://github.com/php/doc-it.git synced 2026-03-27 17:12:15 +01:00
Files
archived-doc-it/reference/datetime/functions/microtime.xml
Hartmut Holzgraefe 1c37529476 en revision update
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@78500 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 07:09:08 +00:00

76 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./it/functions/datetime.xml, last change in rev 1.1 -->
<!-- last change to 'microtime' in en/ tree in rev 1.2 -->
<!-- EN-Revision: 1.2 Maintainer: curcio_it Status: ready -->
<!-- OLD-Revision: 1.71/EN.1.2 -->
<refentry id="function.microtime">
<refnamediv>
<refname>microtime</refname>
<refpurpose>
Restituisce l'attuale UNIX timestamp con i microsecondi</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>string</type><methodname>microtime</methodname>
<void/>
</methodsynopsis>
<para>
Restituisce la stringa "msec sec" dove sec è l'attuale orario
misurato nel numero di secondi dalla Unix Epoch (0:00:00
January 1, 1970 GMT), e msec è la parte in microsecondi. Questa funzione
è disponibile solo su sistemi operativi che supportano la
chiamata di sistema gettimeofday().
</para>
<para>
Entrambi le parti della stringa sono restituite in unità di secondi.
<example>
<title>Esempio di <function>microtime</function></title>
<programlisting role="php">
<![CDATA[
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
for ($i=0; $i < 1000; $i++){
//do nothing, 1000 times
}
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds";
]]>
</programlisting>
</example>
</para>
<para>
Vedere anche <function>time</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->