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

tokio-timer only supports low resolution timer #4

Closed
doyoubi opened this issue Oct 23, 2019 · 4 comments
Closed

tokio-timer only supports low resolution timer #4

doyoubi opened this issue Oct 23, 2019 · 4 comments

Comments

@doyoubi
Copy link
Contributor

doyoubi commented Oct 23, 2019

Hi,

Great lib for batching!!

Just a small problem.
The resolution of tokio-timer is too low. The smallest duration is 1 millisecond.
When batching syscall, we need to use a higher resolution timer.

futures-timer fits the needs but it requires changing the type of the Error returned.
Maybe you can consider moving from tokio-timer to futures-timer.

@doyoubi doyoubi changed the title tokio-timer only supports 1 millisecond resolution tokio-timer only supports low resolution timer Oct 23, 2019
@mre
Copy link
Owner

mre commented Oct 23, 2019

Oh that's an interesting use-case for sure.
If there aren't any downsides, we could make the switch.
Since we are still in 0.x territory (non-stable) it's fine if we change the error type.

Would you mind creating a pull request for that if you find the time? 😊

@mre
Copy link
Owner

mre commented Oct 23, 2019

@yoshuawuyts fyi. Sounds like something that you might find interesting.

@doyoubi
Copy link
Contributor Author

doyoubi commented Oct 23, 2019

Sure! It's just a drop-in replacement.

I'm testing to see whether there are some other problems. I will write some feedback here.

@mre
Copy link
Owner

mre commented Nov 18, 2019

This feature has landed now thanks to @doyoubi. Hurray! 🎉
I've cut a new release and updated the docs to reflect our support for high-resolution timers now.

@mre mre closed this as completed Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants