To pause for some seconds, would I just create a busy loop checking clock_time_get
?
I.e. with WASI
Doesn't matter if the CPU is knackered while doing this, at least not in my scenario
You can use poll
with just a clock timeout
From #include <poll.h>
and just let the wasi-sdk's libc look after how that's implemented? I'm coming from C# but I could still do this.
If you have access to WASI libc, you can also just use sleep
, nanosleep
, etc.
which work in terms of poll
<poll.h> and calling poll would also work
I see, ultimately, they go to __wasi_poll_oneoff
that looks interesting. Thanks
Scott Waye has marked this topic as resolved.
Last updated: Dec 23 2024 at 12:05 UTC