WebAssembly / wasi-clocks

Clocks API for WASI
37 stars 14 forks source link

Add a polling interface for monotonic clocks. #34

Closed sunfishcode closed 1 year ago

sunfishcode commented 1 year ago

The new wasi-poll API has a pollable type. Add subscribe methods to the monotonic clock types to allow polling for timeouts.

This adds a dependency on wasi-io, and is currently implemented in the repository in a low-tech way, which allows the generated documentation to work, though it's likely to evolve.

sunfishcode commented 1 year ago

As before, merging this so that it's easier to see in the main repo. Comments and questions welcome!