<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Time_sig.S.Second.html"> <link rel="Up" href="Time_sig.S.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="Utils" rel="Chapter" href="Utils.html"> <link title="Time_Zone" rel="Chapter" href="Time_Zone.html"> <link title="Period" rel="Chapter" href="Period.html"> <link title="Time_sig" rel="Chapter" href="Time_sig.html"> <link title="Time" rel="Chapter" href="Time.html"> <link title="Ftime" rel="Chapter" href="Ftime.html"> <link title="Date_sig" rel="Chapter" href="Date_sig.html"> <link title="Date" rel="Chapter" href="Date.html"> <link title="Calendar_sig" rel="Chapter" href="Calendar_sig.html"> <link title="Calendar_builder" rel="Chapter" href="Calendar_builder.html"> <link title="Calendar" rel="Chapter" href="Calendar.html"> <link title="Fcalendar" rel="Chapter" href="Fcalendar.html"> <link title="Printer" rel="Chapter" href="Printer.html"> <link title="Version" rel="Chapter" href="Version.html"><link title="Arithmetic operations" rel="Section" href="#3_Arithmeticoperations"> <link title="Constructors" rel="Section" href="#3_Constructors"> <link title="Getters" rel="Section" href="#3_Getters"> <title>Time_sig.S.Period</title> </head> <body> <div class="navbar"><a href="Time_sig.S.Second.html">Previous</a> <a href="Time_sig.S.html">Up</a> </div> <center><h1>Module <a href="type_Time_sig.S.Period.html">Time_sig.S.Period</a></h1></center> <br> <pre><span class="keyword">module</span> Period: <code class="code"><span class="keyword">sig</span></code> <a href="Time_sig.S.Period.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>A period is the number of seconds between two times.<br> <hr width="100%"> <br> <a name="3_Arithmeticoperations"></a> <h3>Arithmetic operations</h3><br> <pre><span class="keyword">include</span> <a href="Period.S.html">Period.S</a></pre> <pre><span class="keyword">val</span> <a name="VALlength"></a>length : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEsecond">Time_sig.S.second</a></code></pre><div class="info"> Number of seconds of a period.<br> </div> <pre><span class="keyword">val</span> <a name="VALmul"></a>mul : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> Multiplication.<br> </div> <pre><span class="keyword">val</span> <a name="VALdiv"></a>div : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> Division.<br> </div> <br> <a name="3_Constructors"></a> <h3>Constructors</h3><br> <pre><span class="keyword">val</span> <a name="VALmake"></a>make : <code class="type">int -> int -> <a href="Time_sig.S.html#TYPEsecond">Time_sig.S.second</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> <code class="code">make hour minute second</code> makes a period of the specified length.<br> </div> <pre><span class="keyword">val</span> <a name="VALlmake"></a>lmake : <code class="type">?hour:int -> ?minute:int -> ?second:<a href="Time_sig.S.html#TYPEsecond">Time_sig.S.second</a> -> unit -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> Labelled version of <code class="code">make</code>. The default value is <code class="code">0</code> for each argument.<br> </div> <pre><span class="keyword">val</span> <a name="VALhour"></a>hour : <code class="type">int -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> <code class="code">hour n</code> makes a period of <code class="code">n</code> hours.<br> </div> <pre><span class="keyword">val</span> <a name="VALminute"></a>minute : <code class="type">int -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> <code class="code">minute n</code> makes a period of <code class="code">n</code> minutes.<br> </div> <pre><span class="keyword">val</span> <a name="VALsecond"></a>second : <code class="type"><a href="Time_sig.S.html#TYPEsecond">Time_sig.S.second</a> -> <a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a></code></pre><div class="info"> <code class="code">second n</code> makes a period of <code class="code">n</code> seconds.<br> </div> <br> <a name="3_Getters"></a> <h3>Getters</h3><br> <pre><span class="keyword">val</span> <a name="VALto_seconds"></a>to_seconds : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> <a href="Time_sig.S.html#TYPEsecond">Time_sig.S.second</a></code></pre><div class="info"> Number of seconds of a period.<br> <b>Since</b> 1.04<br> <b>Example:</b> <code class="code">to_seconds (make 1 2 3)</code> returns <code class="code">3600 + 120 + 3 = 3723</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALto_minutes"></a>to_minutes : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> float</code></pre><div class="info"> Number of minutes of a period. The resulting fractional part represents seconds.<br> <b>Since</b> 1.04<br> <b>Example:</b> <code class="code">to_minutes (make 1 2 3)</code> returns <code class="code">60 + 2 + 0.05 = 62.05</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALto_hours"></a>to_hours : <code class="type"><a href="Time_sig.S.html#TYPEt">Time_sig.S.t</a> -> float</code></pre><div class="info"> Number of hours of a period. The resulting fractional part represents minutes and seconds.<br> <b>Since</b> 1.04<br> <b>Example:</b> <code class="code">to_hours (make 1 3 0)</code> returns <code class="code">1 + 0.05 = 1.05</code>.<br> </div> </body></html>