Code Monkey home page Code Monkey logo

async-timers's People

Contributors

blyschak avatar

Watchers

 avatar

Forkers

bradnelson xosmig

async-timers's Issues

Period is wrong - possibly early tick() behavior

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.

Deriving Default on Enums requires nightly

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 macroDefault(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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.