FGRibreau / FGRibreau/spinners
Can we stop with final timer?
Open
enhancement
- Dominant language
- Rust
- Stars
- 602
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
When we create a spinner with `Spinner::with_timer`, after issuing a `stop` I'd like to add a message with the final timer : Eg: `Took xx seconds` or even access the final timer from the spinner.
```rust
let mut sp = Spinner::with_timer(Spinners::Dots3, "Download...".into());
sp.stop_and_persist_with_timer("✔", "Download Complete!".into());
// or
sp.stop_and_persist("✔", "Download Complete!".into());
let final_time : &str = sp.get_final_time();
println!("Took {} long.", final_time);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.