1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) INRIA -
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
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="en" xml:id="realtime">
14 <refnamediv xml:id="realtimeinit">
15 <refname>realtimeinit</refname>
16 <refpurpose>set time unit</refpurpose>
19 <refname>realtime</refname>
20 <refpurpose>set dates origin or waits until date</refpurpose>
23 <title>Calling Sequence</title>
24 <synopsis>realtimeinit(time_unit)
29 <title>Arguments</title>
32 <term>time_unit</term>
35 a real number. The number of seconds associated to the <literal>realtime</literal> argument
42 <para>a real number. A date</para>
48 <title>Description</title>
49 <para> These two functions can be used to handle real time into Scilab.</para>
51 <literal>realtimeinit(time_unit)</literal> defines the time unit
52 associated to the <literal>realtime</literal> argument <literal>t</literal>
55 first call to <literal>realtime(t0)</literal> sets current date to
56 (<literal>t0</literal>).
57 subsequent calls to <literal>realtime(t)</literal> wait till date <literal>t</literal> is
62 <title>Examples</title>
63 <programlisting role="example"><![CDATA[
64 realtimeinit(1/2);//sets time unit to half a second
65 realtime(0);//sets current date to 0
68 mprintf('current time is '+string(k/2)+'sec .\r\n');
71 //next instruction outputs a dot each 2 seconds
86 <programlisting role="example"><![CDATA[
96 <refsection role="see also">
97 <title>See Also</title>
98 <simplelist type="inline">
100 <link linkend="getdate">getdate</link>