()
| 313 | // immediately. |
| 314 | #[test] |
| 315 | fn subscribe_no_duration() { |
| 316 | crate::runtime::block_on(async { |
| 317 | let reactor = Reactor::current(); |
| 318 | let pollable = wasip2::clocks::monotonic_clock::subscribe_duration(0); |
| 319 | let sched = reactor.schedule(pollable); |
| 320 | sched.wait_for().await; |
| 321 | }) |
| 322 | } |
| 323 | // Using WASMTIME_LOG, observe that this test calls poll() until the timer is ready. |
| 324 | #[test] |
| 325 | fn subscribe_some_duration() { |