2 releases

Uses old Rust 2015

0.1.1 Jul 1, 2017
0.1.0 Jul 1, 2017

#396 in Date and time

Download history 1627/week @ 2024-04-08 2388/week @ 2024-04-15 836/week @ 2024-04-22 647/week @ 2024-04-29 965/week @ 2024-05-06 889/week @ 2024-05-13 547/week @ 2024-05-20 427/week @ 2024-05-27 900/week @ 2024-06-03 651/week @ 2024-06-10 978/week @ 2024-06-17 641/week @ 2024-06-24 1162/week @ 2024-07-01 952/week @ 2024-07-08 1599/week @ 2024-07-15 728/week @ 2024-07-22

4,461 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