# mimir_progress
A terminal progress bar library for Rust.
## Features
- Configurable update intervals: time-based, count-based, or percentage-based
- For instance, in CI/CD an update could be issued every 1000ms to avoid spamming the logs, or every 30ms for rapid updates in an interactive environment
- Displays elapsed time, estimated remaining time, and processing rate
- Optional same-line rendering (can be disabled for CI environments)
- Customizable message prefix
## Usage
```rust
use mimir_progress::{Progress, ProgressInterval};
use std::time::Duration;
// Update every 2 seconds
let mut pb = Progress::new(1000, ProgressInterval::Time(Duration::from_secs(2)));
// Or update every 100 items
let mut pb = Progress::new(1000, ProgressInterval::Count(100));
// Or update every 10%
let mut pb = Progress::new(1000, ProgressInterval::Percent(10));
pb.set_prefix("Processing: ".to_string());
for _ in 0..1000 {
// do work
pb.inc();
}
```
## Dependencies
- `humantime` - Duration formatting
- `termion` - Terminal control sequences