futures-timer icon indicating copy to clipboard operation
futures-timer copied to clipboard

feature request: consider add Ticker

Open Sherlock-Holo opened this issue 5 years ago • 5 comments

consider adding a new struct Ticker, which implement futures::Stream, can return an instant periodically by use .next().await

Sherlock-Holo avatar May 31 '20 17:05 Sherlock-Holo

In the absence of this, I quickly wrote & released https://crates.io/crates/futures-ticker (crate) - happy to merge it into this crate, or keep it independent (and implement it for different Timer schemes, e.g. smol's).

antifuchs avatar Jun 27 '20 18:06 antifuchs

Thanks for opening @Sherlock-Holo! I guess we may want to re-introduce async_std::stream::interval into this crate.

yoshuawuyts avatar Jun 29 '20 18:06 yoshuawuyts

@yoshuawuyts Hi, i'm looking for this functionality exactly, being able to run some work at every interval

kennetpostigo avatar Aug 29 '20 19:08 kennetpostigo

Indeed, I ended up at this issue because I tried to figure out what happened to Interval from the legacy futures version of futures-timer.

bittrance avatar Sep 11 '20 22:09 bittrance

Hi, Is there any plan to merge https://github.com/async-rs/futures-timer/issues/60#issuecomment-650601845 into this repo?

youngjoon-lee avatar May 08 '23 06:05 youngjoon-lee