-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
It would be great if Timer was not just a Future but also a Stream so that it could act as a "ticker" delivering events at regular intervals.
Proposed API:
impl Timer {
fn interval(period: Duration) -> Timer;
fn interval_at(start: Instant, period: Duration) -> Timer;
fn set_interval(&mut self, period: Duration);
fn set_interval_at(&mut self, start: Instant, period: Duration);
}
impl Stream for Timer {
type Item = Instant;
}Thoughts or suggestions?
sehz, akhilles, kyren and dbuch
Metadata
Metadata
Assignees
Labels
No labels