|
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
6 | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
7 | | -<meta name="generator" content="Asciidoctor 2.0.18"> |
| 7 | +<meta name="generator" content="Asciidoctor 2.0.26"> |
8 | 8 | <meta name="author" content="Malcolm Sparks, Henry Widd, Johanna Antonelli"> |
9 | 9 | <link rel="icon" type="image/x-icon" href="favicon.ico"> |
10 | 10 | <title>tick</title> |
@@ -2212,12 +2212,24 @@ <h3 id="_misc">5.4. Misc</h3> |
2212 | 2212 | </div> |
2213 | 2213 | <div class="paragraph"> |
2214 | 2214 | <p>The problem with numeric times is that there are cases where the units |
2215 | | -are in seconds and cases where milliseconds are used. If <em>tick</em> were |
2216 | | -to convert numbers to times, it would be a source of confusion and |
2217 | | -bugs if the units were not clear. For this reason, you cannot convert |
2218 | | -numbers to times. However, you can first create the duration from the |
2219 | | -number, specifying the units explicitly, and then convert the duration |
2220 | | -to an <code>instant</code> (or <code>inst</code>).</p> |
| 2215 | +are in seconds and cases where milliseconds are used. To avoid ambiguity |
| 2216 | +about the units, the recommended approach is to first create the duration |
| 2217 | +from the number, specifying the units explicitly, and then convert the |
| 2218 | +duration to an <code>instant</code> (or <code>inst</code>).</p> |
| 2219 | +</div> |
| 2220 | +<div class="admonitionblock note"> |
| 2221 | +<table> |
| 2222 | +<tr> |
| 2223 | +<td class="icon"> |
| 2224 | +<div class="title">Note</div> |
| 2225 | +</td> |
| 2226 | +<td class="content"> |
| 2227 | +<code>t/instant</code> does accept a bare number for convenience, treating it |
| 2228 | +as epoch milliseconds. The duration-based form below is preferred because |
| 2229 | +the units are explicit. |
| 2230 | +</td> |
| 2231 | +</tr> |
| 2232 | +</table> |
2221 | 2233 | </div> |
2222 | 2234 | <div class="listingblock code"> |
2223 | 2235 | <div class="content"> |
|
0 commit comments