-
Notifications
You must be signed in to change notification settings - Fork 80
Add interval api. #41
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
Conversation
|
Looks like ci is having issues (https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/) |
|
@stjepang any comments? It's currently blocking a PR of mine. |
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this! The PR looks good, I would just request the following changes:
- Implement
poll()by callingpoll_next(). Treat a regular timer (at()/after()) as a stream (interval_at()) with a period of infinity. - Add a unit test to tests/timer.rs
This comment has been minimized.
This comment has been minimized.
|
Why is the first tick of a timer constructed by |
This comment has been minimized.
This comment has been minimized.
|
I think I agree, you can easily get the first tick with |
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
Can you release 1.3.0? Then I can update my PR's to libp2p. |
Based on #35, needed to use async-io in more places in libp2p.