2 releases
Uses old Rust 2015
0.1.1 | Jul 1, 2017 |
---|---|
0.1.0 | Jul 1, 2017 |
#396 in Date and time
4,461 downloads per month
Used in 5 crates
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)
}