rpm-timer 0.0.3

Small and simple to use tool that limits your processing speed to specified number of items per minute (or per second). Perfect for rate-limited APIs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate rpm_timer;

use rpm_timer::RpmTimer;

fn main() {
    let items = &["Hello", "World!", "How", "are", "you?"];

    RpmTimer::default()
        .rps_limit(1.0)
        .max_threads(1)
        .run_slice(items, print);
}

fn print(items: &[&str]) {
    for item in items {
        println!("{}", item);
    }
}