run_every 0.1.0

Run some code up to once per specified duration
Documentation
# run_every

[![Docs](https://docs.rs/run_every/badge.svg)](https://docs.rs/run_every/latest/run_every/)
[![Crates.io](https://img.shields.io/crates/v/run_every.svg)](https://crates.io/crates/run_every)
[![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/Riateche/run_every#license)

Run some code up to once per specified duration.

Example:

```rust
use run_every::run_every;

for _ in 0..1000 {
    let result = do_something();
    if let Err(error) = result {
        run_every!(Duration::from_secs(10), println!("something failed: {error:?}"));
    }
}
```

A block of code can also be used:

```rust
run_every!(Duration::from_secs(10), {
    println!("error!");
    println!("retrying...");
});
```

The implementation uses a combination of a global mutex and thread local storage to reduce contention.