2 releases

Uses old Rust 2015

0.1.1 Jul 1, 2017
0.1.0 Jul 1, 2017

#408 in Date and time

Download history 737/week @ 2024-07-22 448/week @ 2024-07-29 900/week @ 2024-08-05 493/week @ 2024-08-12 871/week @ 2024-08-19 719/week @ 2024-08-26 1218/week @ 2024-09-02 1039/week @ 2024-09-09 553/week @ 2024-09-16 1113/week @ 2024-09-23 755/week @ 2024-09-30 822/week @ 2024-10-07 962/week @ 2024-10-14 605/week @ 2024-10-21 687/week @ 2024-10-28 448/week @ 2024-11-04

2,715 downloads per month
Used in 5 crates

MIT license

4KB
59 lines

ticker

Rate limited Iterators!

Print 0-9, one number per second:

let ticker = Ticker::new((0..10), Duration::from_secs(1));
for i in ticker {
    println!("{:?}", i)
}

lib.rs:

ticker provides a periodic tick to rate limit an Iterator.

E.g. print 0-9, one number per second:

let ticker = Ticker::new((0..10), Duration::from_secs(1));
for i in ticker {
    println!("{:?}", i)
}

No runtime deps