```rust
fn onenanosecond() { let rl = RateLimit::new(1, Duration::fromnanos(1)).unwrap(); let mut rler = RateLimiter::new(rl); let then = Instant::now(); asserteq!(rler.checkat(then), true); let now = then + Duration::fromnanos(2); asserteq!(rler.check_at(now), true); } ```
Beta? Only has basic tests but seems to work.
Copyright (c) 2020 James Laver, simple-rate-limit contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.