WebAssembly / wasi-clocks

Clocks API for WASI
40 stars 14 forks source link

Add a timer facility to wasi-clocks. #12

Closed sunfishcode closed 2 years ago

sunfishcode commented 2 years ago

Add a timer facility that allows one to create timers that start at a given time and count down to zero, on a given clock.

The expectation is that this can be used in combination with polling to implement more flexible timeouts.

codefromthecrypt commented 2 years ago

what happens if this is called twice on the same clock? does it invalidate the prior or make a nested timer?

sunfishcode commented 2 years ago

For anyone following along, this question is answered in #13.