blyschak / async-timers Goto Github PK
View Code? Open in Web Editor NEWAsync timers built on tokio's timer primitives
License: The Unlicense
Async timers built on tokio's timer primitives
License: The Unlicense
I set a 10ms PeriodicTimer in a Linux system, and found with further inspection that the actual period is usually 1-2 ms.
Upon looking at the Interval docs, the Interval tick()
behavior might be the culprit. It says it always returns the first time it's called in the docs. Maybe this needs to be called once when the timer is set up to make the behavior more predictable? I can see an edge case where this is desired, but I don't think it's the main case. I can't use a OneshotTimer in my use case because the handling code is in a tokio_select! that starts/stops/restarts the timer dynamically.
Cool crate, exactly what I was looking for.
I'm building my application in an environment that doesn't allow using nightly/experimental features:
| error[E0658]: deriving
Defaulton enums is experimental | --> /usr/src/debug//...//github.com-1ecc6299db9ec823/async-timers-0.1.4/src/lib.rs:110:10 | | | 110 | #[derive(Default, Debug)] | | ^^^^^^^ | | | = note: see issue #86985 <https://github.com/rust-lang/rust/issues/86985> for more information | = note: this error originates in the derive macro
Default(in Nightly builds, run with -Z macro-backtrace for more info)
And I do love the ergonomics of deriving Default like this, but looks like I can't use it in my app. Looks like it's just two enums. Would it be possible to remove these derives or put them behind a feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.