Skip to content

Add a sleep function to the Core #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
newpavlov opened this issue Aug 19, 2019 · 2 comments
Closed

Add a sleep function to the Core #77

newpavlov opened this issue Aug 19, 2019 · 2 comments

Comments

@newpavlov
Copy link

It seems like a pretty fundamental function, which is currently missing from the Core. It could be as simple as sleep(uint64_t nanos).

@sunfishcode
Copy link
Member

I'm the current API, the way to implement sleep is to use poll_oneoff, polling for a single __WASI_EVENTTYPE_CLOCK event.

@newpavlov
Copy link
Author

Ah, good to know. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants