Skip to content
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

Async support #129

Open
diondokter opened this issue Nov 17, 2022 · 0 comments
Open

Async support #129

diondokter opened this issue Nov 17, 2022 · 0 comments

Comments

@diondokter
Copy link

Now that GATs are stable, async support can be added on stable. This would really help when writing async code.

Some of the APIs that would benefit from this are:

fn try_now(&self) -> Result<Instant<Self>, Error>;

pub fn elapsed(&self) -> Result<Dur, TimeError>

pub fn remaining(&self) -> Result<Dur, TimeError>

pub fn wait(self) -> Result<Timer<'a, OneShot, Armed, Clock, Dur>, TimeError> {

The async APIs should probably be made parallel to the existing APIs and not replace them

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

1 participant