|
1 | | -package wasi:clocks@0.3.0-rc-2025-08-14; |
| 1 | +package wasi:clocks@0.3.0-rc-2025-08-15; |
2 | 2 | /// WASI Monotonic Clock is a clock API intended to let users measure elapsed |
3 | 3 | /// time. |
4 | 4 | /// |
|
7 | 7 | /// |
8 | 8 | /// A monotonic clock is a clock which has an unspecified initial value, and |
9 | 9 | /// successive reads of the clock will produce non-decreasing values. |
10 | | -@since(version = 0.3.0-rc-2025-08-14) |
| 10 | +@since(version = 0.3.0-rc-2025-08-15) |
11 | 11 | interface monotonic-clock { |
12 | 12 | /// An instant in time, in nanoseconds. An instant is relative to an |
13 | 13 | /// unspecified initial value, and can only be compared to instances from |
14 | 14 | /// the same monotonic-clock. |
15 | | - @since(version = 0.3.0-rc-2025-08-14) |
| 15 | + @since(version = 0.3.0-rc-2025-08-15) |
16 | 16 | type instant = u64; |
17 | 17 |
|
18 | 18 | /// A duration of time, in nanoseconds. |
19 | | - @since(version = 0.3.0-rc-2025-08-14) |
| 19 | + @since(version = 0.3.0-rc-2025-08-15) |
20 | 20 | type duration = u64; |
21 | 21 |
|
22 | 22 | /// Read the current value of the clock. |
23 | 23 | /// |
24 | 24 | /// The clock is monotonic, therefore calling this function repeatedly will |
25 | 25 | /// produce a sequence of non-decreasing values. |
26 | | - @since(version = 0.3.0-rc-2025-08-14) |
| 26 | + @since(version = 0.3.0-rc-2025-08-15) |
27 | 27 | now: func() -> instant; |
28 | 28 |
|
29 | 29 | /// Query the resolution of the clock. Returns the duration of time |
30 | 30 | /// corresponding to a clock tick. |
31 | | - @since(version = 0.3.0-rc-2025-08-14) |
32 | | - resolution: func() -> duration; |
| 31 | + @since(version = 0.3.0-rc-2025-08-15) |
| 32 | + get-resolution: func() -> duration; |
33 | 33 |
|
34 | 34 | /// Wait until the specified instant has occurred. |
35 | | - @since(version = 0.3.0-rc-2025-08-14) |
36 | | - wait-until: func( |
| 35 | + @since(version = 0.3.0-rc-2025-08-15) |
| 36 | + wait-until: async func( |
37 | 37 | when: instant, |
38 | 38 | ); |
39 | 39 |
|
40 | 40 | /// Wait for the specified duration has elapsed. |
41 | | - @since(version = 0.3.0-rc-2025-08-14) |
42 | | - wait-for: func( |
| 41 | + @since(version = 0.3.0-rc-2025-08-15) |
| 42 | + wait-for: async func( |
43 | 43 | how-long: duration, |
44 | 44 | ); |
45 | 45 | } |
0 commit comments