Skip to content

Can we stop with final timer?Β #36

@rapidclock

Description

@rapidclock

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.

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);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions