mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-27 10:22:07 +01:00
126 lines
2.9 KiB
XML
126 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- CREDITS: DAnnebicque -->
|
|
<refentry xml:id="function.gettimeofday" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>gettimeofday</refname>
|
|
<refpurpose>Retourne l'heure actuelle</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>array</type><type>float</type></type><methodname>gettimeofday</methodname>
|
|
<methodparam choice="opt"><type>bool</type><parameter>as_float</parameter><initializer>&false;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
C'est une interface avec gettimeofday(2). Elle retourne un tableau
|
|
associatif qui contient les informations retournées par le système.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>as_float</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Lorsque défini à &true;, un &float; est retourné à la place d'un tableau.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Par défaut, un &array; est retourné. Si le paramètre <parameter>as_float</parameter>
|
|
est défini, alors un &float; sera retourné.
|
|
</para>
|
|
<para>
|
|
Clés du tableau :
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
"sec" : secondes depuis l'époque Unix
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
"usec" : microsecondes
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
"minuteswest" : minutes de décalage par rapport à Greenwich,
|
|
vers l'Ouest.
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
"dsttime" : type de correction dst
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>gettimeofday</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
print_r(gettimeofday());
|
|
|
|
echo gettimeofday(true);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[sec] => 1073504408
|
|
[usec] => 238215
|
|
[minuteswest] => 0
|
|
[dsttime] => 1
|
|
)
|
|
|
|
1073504408.23910
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|