feat: print elapsed time on quit for chrono mode

This commit is contained in:
Pihkaal
2024-01-21 00:52:23 +01:00
parent 59f09dcd3a
commit 16a73291c1

View File

@@ -175,6 +175,10 @@ fn main() -> io::Result<()> {
let _ = terminal::disable_raw_mode().unwrap(); let _ = terminal::disable_raw_mode().unwrap();
execute!(stdout, terminal::LeaveAlternateScreen, cursor::Show)?; execute!(stdout, terminal::LeaveAlternateScreen, cursor::Show)?;
if get_app_mode() == AppMode::Chrono {
println!("Elapsed time: {:?}", start_time.elapsed());
}
// Be polite // Be polite
if config.be_polite { if config.be_polite {
println!("CTRL-C pressed, bye!\n"); println!("CTRL-C pressed, bye!\n");