File: Time.Period.html

package info (click to toggle)
calendar 1.09.3-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 916 kB
  • ctags: 685
  • sloc: ml: 1,336; makefile: 140; sh: 14
file content (81 lines) | stat: -rw-r--r-- 5,064 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="Start" href="index.html">
<link rel="Up" href="Time.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="Time_Zone" rel="Chapter" href="Time_Zone.html">
<link title="Period" rel="Chapter" href="Period.html">
<link title="Time" rel="Chapter" href="Time.html">
<link title="Date" rel="Chapter" href="Date.html">
<link title="Calendar" rel="Chapter" href="Calendar.html">
<link title="Printer" rel="Chapter" href="Printer.html"><link title="Arithmetic operations" rel="Section" href="#2_Arithmeticoperations">
<link title="Constructors" rel="Section" href="#2_Constructors">
<link title="Getters" rel="Section" href="#2_Getters">
<title>Time.Period</title>
</head>
<body>
<div class="navbar">&nbsp;<a href="Time.html">Up</a>
&nbsp;</div>
<center><h1>Module <a href="type_Time.Period.html">Time.Period</a></h1></center>
<br>
<pre><span class="keyword">module</span> Period: <code class="code">sig</code> <a href="Time.Period.html">..</a> <code class="code">end</code></pre><hr width="100%">
<br>
A period is the number of seconds between two times.<br>
<br>
<a name="2_Arithmeticoperations"></a>
<h2>Arithmetic operations</h2><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.html#TYPEt">Time.t</a> -> int</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.html#TYPEt">Time.t</a> -> <a href="Time.html#TYPEt">Time.t</a> -> <a href="Time.html#TYPEt">Time.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.html#TYPEt">Time.t</a> -> <a href="Time.html#TYPEt">Time.t</a> -> <a href="Time.html#TYPEt">Time.t</a></code></pre><div class="info">
Division.<br>
</div>
<br>
<a name="2_Constructors"></a>
<h2>Constructors</h2><br>
<pre><span class="keyword">val</span> <a name="VALmake"></a>make : <code class="type">int -> int -> int -> <a href="Time.html#TYPEt">Time.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:int -> unit -> <a href="Time.html#TYPEt">Time.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.html#TYPEt">Time.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.html#TYPEt">Time.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">int -> <a href="Time.html#TYPEt">Time.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="2_Getters"></a>
<h2>Getters</h2><br>
<pre><span class="keyword">val</span> <a name="VALto_seconds"></a>to_seconds : <code class="type"><a href="Time.html#TYPEt">Time.t</a> -> int</code></pre><div class="info">
Number of seconds of a period. 
      E.g. <code class="code">to_seconds (make 1 2 3)</code> returns <code class="code">3600 + 120 + 3 = 3723</code>.<br>
<b>Since</b> 1.04<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_minutes"></a>to_minutes : <code class="type"><a href="Time.html#TYPEt">Time.t</a> -> float</code></pre><div class="info">
Number of minutes of a period. The resulting fractional part 
      represents seconds.
      E.g. <code class="code">to_minutes (make 1 2 3)</code> returns <code class="code">60 + 2 + 0.05 = 62.05</code>.<br>
<b>Since</b> 1.04<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_hours"></a>to_hours : <code class="type"><a href="Time.html#TYPEt">Time.t</a> -> float</code></pre><div class="info">
Number of hours of a period. The resulting fractional part represents 
      minutes and seconds.
      E.g. <code class="code">to_hours (make 1 3 0)</code> returns <code class="code">1 + 0.05 = 1.05</code>.<br>
<b>Since</b> 1.04<br>
</div>
</body></html>