@@ -123,19 +123,20 @@ elapsed from the time this function is invoked.</p>
123
123
time. The clock is not necessarily monotonic as it may be reset.</p >
124
124
<p >It is intended to be portable at least between Unix-family platforms and
125
125
Windows.</p >
126
- <p >A wall clock is a clock which measures the date and time according to
127
- some external reference.</p >
126
+ <p >An " ; instant" ; , or " ; exact time" ; , is a point in time without regard to any time
127
+ zone: just the time since a particular external reference point, often
128
+ called an " ; epoch" ; .</p >
128
129
<p >External references may be reset, so this clock is not necessarily
129
130
monotonic, making it unsuitable for measuring elapsed time.</p >
130
131
<p >It is intended for reporting the current date and time for humans.</p >
131
132
<hr />
132
133
<h3 >Types</h3 >
133
- <h4 ><a name =" datetime " ></a ><code >record datetime </code ></h4 >
134
- <p >A time and date in seconds plus nanoseconds.</p >
134
+ <h4 ><a name =" instant " ></a ><code >record instant </code ></h4 >
135
+ <p >An exact time in seconds plus nanoseconds.</p >
135
136
<h5 >Record Fields</h5 >
136
137
<ul >
137
- <li ><a name =" datetime .seconds" ></a ><code >seconds</code >: <code >u64</code ></li >
138
- <li ><a name =" datetime .nanoseconds" ></a ><code >nanoseconds</code >: <code >u32</code ></li >
138
+ <li ><a name =" instant .seconds" ></a ><code >seconds</code >: <code >u64</code ></li >
139
+ <li ><a name =" instant .nanoseconds" ></a ><code >nanoseconds</code >: <code >u32</code ></li >
139
140
</ul >
140
141
<hr />
141
142
<h3 >Functions</h3 >
@@ -149,23 +150,23 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
149
150
<p >The nanoseconds field of the output is always less than 1000000000.</p >
150
151
<h5 >Return values</h5 >
151
152
<ul >
152
- <li ><a name =" now.0 " ></a > <a href =" #datetime " ><a href =" #datetime " ><code >datetime </code ></a ></a ></li >
153
+ <li ><a name =" now.0 " ></a > <a href =" #instant " ><a href =" #instant " ><code >instant </code ></a ></a ></li >
153
154
</ul >
154
155
<h4 ><a name =" resolution " ></a ><code >resolution: func</code ></h4 >
155
156
<p >Query the resolution of the clock.</p >
156
157
<p >The nanoseconds field of the output is always less than 1000000000.</p >
157
158
<h5 >Return values</h5 >
158
159
<ul >
159
- <li ><a name =" resolution.0 " ></a > <a href =" #datetime " ><a href =" #datetime " ><code >datetime </code ></a ></a ></li >
160
+ <li ><a name =" resolution.0 " ></a > <a href =" #instant " ><a href =" #instant " ><code >instant </code ></a ></a ></li >
160
161
</ul >
161
162
<
h2 ><
a name =
" wasi_clocks_timezone_0_2_0 " ></
a >Import interface wasi:clocks/
[email protected] </
h2 >
162
163
<hr />
163
164
<h3 >Types</h3 >
164
- <h4 ><a name =" datetime " ></a ><code >type datetime </code ></h4 >
165
- <p ><a href =" #datetime " ><a href =" #datetime " ><code >datetime </code ></a ></a ></p >
165
+ <h4 ><a name =" instant " ></a ><code >type instant </code ></h4 >
166
+ <p ><a href =" #instant " ><a href =" #instant " ><code >instant </code ></a ></a ></p >
166
167
<p >
167
168
#### <a name =" timezone_display " ></a >` record timezone-display `
168
- <p >Information useful for displaying the timezone of a specific <a href =" #datetime " ><code >datetime </code ></a >.</p >
169
+ <p >Information useful for displaying the timezone of a specific <a href =" #instant " ><code >instant </code ></a >.</p >
169
170
<p >This information may vary within a single <code >timezone</code > to reflect daylight
170
171
saving time adjustments.</p >
171
172
<h5 >Record Fields</h5 >
@@ -199,15 +200,15 @@ should return false.</p>
199
200
<hr />
200
201
<h3 >Functions</h3 >
201
202
<h4 ><a name =" display " ></a ><code >display: func</code ></h4 >
202
- <p >Return information needed to display the given <a href =" #datetime " ><code >datetime </code ></a >. This includes
203
+ <p >Return information needed to display the given <a href =" #instant " ><code >instant </code ></a >. This includes
203
204
the UTC offset, the time zone name, and a flag indicating whether
204
205
daylight saving time is active.</p >
205
- <p >If the timezone cannot be determined for the given <a href =" #datetime " ><code >datetime </code ></a >, return a
206
+ <p >If the timezone cannot be determined for the given <a href =" #instant " ><code >instant </code ></a >, return a
206
207
<a href =" #timezone_display " ><code >timezone-display</code ></a > for <code >UTC</code > with a <a href =" #utc_offset " ><code >utc-offset</code ></a > of 0 and no daylight
207
208
saving time.</p >
208
209
<h5 >Params</h5 >
209
210
<ul >
210
- <li ><a name =" display.when " ></a ><code >when</code >: <a href =" #datetime " ><a href =" #datetime " ><code >datetime </code ></a ></a ></li >
211
+ <li ><a name =" display.when " ></a ><code >when</code >: <a href =" #instant " ><a href =" #instant " ><code >instant </code ></a ></a ></li >
211
212
</ul >
212
213
<h5 >Return values</h5 >
213
214
<ul >
@@ -217,7 +218,7 @@ saving time.</p>
217
218
<p >The same as <a href =" #display " ><code >display</code ></a >, but only return the UTC offset.</p >
218
219
<h5 >Params</h5 >
219
220
<ul >
220
- <li ><a name =" utc_offset.when " ></a ><code >when</code >: <a href =" #datetime " ><a href =" #datetime " ><code >datetime </code ></a ></a ></li >
221
+ <li ><a name =" utc_offset.when " ></a ><code >when</code >: <a href =" #instant " ><a href =" #instant " ><code >instant </code ></a ></a ></li >
221
222
</ul >
222
223
<h5 >Return values</h5 >
223
224
<ul >
0 commit comments