bd4fe50be39eb0a785d5c91a41780555df17b51b
[scilab.git] / scilab / modules / time / help / ja_JP / realtime.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA -
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="realtime">
17     <refnamediv xml:id="realtimeinit">
18         <refname>realtimeinit</refname>
19         <refpurpose>時間の単位を設定</refpurpose>
20     </refnamediv>
21     <refnamediv>
22         <refname>realtime</refname>
23         <refpurpose>日付の原点を設定または指定日付まで待つ</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>呼び出し手順</title>
27         <synopsis>realtimeinit(time_unit)
28             realtime(t)
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>パラメータ</title>
33         <variablelist>
34             <varlistentry>
35                 <term>time_unit</term>
36                 <listitem>
37                     <para>
38                         実数. <literal>realtime</literal> の引数に関連する秒数
39                     </para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>t</term>
44                 <listitem>
45                     <para>実数.  日付</para>
46                 </listitem>
47             </varlistentry>
48         </variablelist>
49     </refsection>
50     <refsection>
51         <title>説明</title>
52         <para>
53             これら2つの関数はScilabで実時間を処理する際に使用できます.
54         </para>
55         <para>
56             <literal>realtimeinit(time_unit)</literal>  は,
57             <literal>realtime</literal> の引数 <literal>t</literal>に
58             関する時間の単位を定義します.
59         </para>
60         <para>
61             <literal>realtime(t0)</literal>を最初にコールした際,
62             カレントの日付が<literal>t0</literal>に設定されます.
63             これ以降のコール<literal>realtime(t)</literal>では,
64             日付<literal>t</literal>に達するまで待機します.
65         </para>
66     </refsection>
67     <refsection>
68         <title>例</title>
69         <programlisting role="example"><![CDATA[
70 realtimeinit(1/2);//時間の単位を 0.5秒に設定s
71 realtime(0);// カレントの時刻を 0に設定
72 for k=1:10
73   realtime(k);
74   mprintf('current time is '+string(k/2)+'sec .\r\n');
75 end
76 //次の命令では2秒毎にドットを出力
77 realtimeinit(2);
78 realtime(0);
79 for k=1:10
80   realtime(k);
81   mprintf('.\r\n');
82 end
83 realtimeinit(1);
84 realtime(0);
85 dt=getdate('s');
86 realtime(10);
87 getdate('s')-dt
88  ]]></programlisting>
89         <programlisting role="example"><![CDATA[
90 realtimeinit(1);
91 realtime(0);
92 t1 = now()
93 datevec(t1)
94 realtime(10);
95 t1 = now()
96 datevec(t1)
97  ]]></programlisting>
98     </refsection>
99     <refsection role="see also">
100         <title>参照</title>
101         <simplelist type="inline">
102             <member>
103                 <link linkend="getdate">getdate</link>
104             </member>
105         </simplelist>
106     </refsection>
107 </refentry>