New examples (from now)
[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  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <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" version="5.0-subset Scilab" xml:lang="ja" xml:id="realtime">
14     <refnamediv xml:id="realtimeinit">
15         <refname>realtimeinit</refname>
16         <refpurpose>時間の単位を設定</refpurpose>
17     </refnamediv>
18     <refnamediv>
19         <refname>realtime</refname>
20         <refpurpose>日付の原点を設定または指定日付まで待つ</refpurpose>
21     </refnamediv>
22     <refsynopsisdiv>
23         <title>呼び出し手順</title>
24         <synopsis>realtimeinit(time_unit)
25             realtime(t)
26         </synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>パラメータ</title>
30         <variablelist>
31             <varlistentry>
32                 <term>time_unit</term>
33                 <listitem>
34                     <para>
35                         実数. <literal>realtime</literal> の引数に関連する秒数
36                     </para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>t</term>
41                 <listitem>
42                     <para>実数.  日付</para>
43                 </listitem>
44             </varlistentry>
45         </variablelist>
46     </refsection>
47     <refsection>
48         <title>説明</title>
49         <para>   
50             これら2つの関数はScilabで実時間を処理する際に使用できます.
51         </para>
52         <para>
53             <literal>realtimeinit(time_unit)</literal>  は,
54             <literal>realtime</literal> の引数 <literal>t</literal>に
55             関する時間の単位を定義します.
56         </para>
57         <para>
58             <literal>realtime(t0)</literal>を最初にコールした際,
59             カレントの日付が<literal>t0</literal>に設定されます.
60             これ以降のコール<literal>realtime(t)</literal>では,
61             日付<literal>t</literal>に達するまで待機します.
62         </para>
63     </refsection>
64     <refsection>
65         <title>例</title>
66         <programlisting role="example"><![CDATA[ 
67 realtimeinit(1/2);//時間の単位を 0.5秒に設定s
68 realtime(0);// カレントの時刻を 0に設定
69 for k=1:10
70   realtime(k);
71   mprintf('current time is '+string(k/2)+'sec .\r\n');
72 end
73
74 //次の命令では2秒毎にドットを出力
75 realtimeinit(2);
76 realtime(0);
77 for k=1:10
78   realtime(k);
79   mprintf('.\r\n');
80 end
81
82 realtimeinit(1);
83 realtime(0);
84 dt=getdate('s');
85 realtime(10);
86 getdate('s')-dt
87  ]]></programlisting>
88         <programlisting role="example"><![CDATA[ 
89 realtimeinit(1);
90 realtime(0);
91 t1 = now()
92 datevec(t1)
93 realtime(10);
94 t1 = now()
95 datevec(t1)
96  ]]></programlisting>
97
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>