FGRibreau / FGRibreau/spinners

Can we stop with final timer?

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.