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 * Copyright (C) 2012 - 2016 - Scilab Enterprises
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.
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="en" xml:id="realtime">
17 <refnamediv xml:id="realtimeinit">
18 <refname>realtimeinit</refname>
19 <refpurpose>set time unit</refpurpose>
22 <refname>realtime</refname>
23 <refpurpose>set dates origin or waits until date</refpurpose>
27 <synopsis>realtimeinit(time_unit)
32 <title>Arguments</title>
35 <term>time_unit</term>
38 a real number. The number of seconds associated to the <literal>realtime</literal> argument
45 <para>a real number. A date</para>
51 <title>Description</title>
52 <para> These two functions can be used to handle real time into Scilab.</para>
54 <literal>realtimeinit(time_unit)</literal> defines the time unit
55 associated to the <literal>realtime</literal> argument <literal>t</literal>
58 first call to <literal>realtime(t0)</literal> sets current date to
59 (<literal>t0</literal>).
60 subsequent calls to <literal>realtime(t)</literal> wait till date <literal>t</literal> is
65 <title>Examples</title>
66 <programlisting role="example"><![CDATA[
67 realtimeinit(1/2);//sets time unit to half a second
68 realtime(0);//sets current date to 0
71 mprintf('current time is '+string(k/2)+'sec .\r\n');
74 //next instruction outputs a dot each 2 seconds
89 <programlisting role="example"><![CDATA[
99 <refsection role="see also">
100 <title>See also</title>
101 <simplelist type="inline">
103 <link linkend="getdate">getdate</link>