diff options
author | Daniel <kingdread@gmx.de> | 2020-06-12 12:49:44 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2020-06-12 12:49:44 +0200 |
commit | 47348c960072d62031490e923d7fe5a9122ff1cc (patch) | |
tree | ff27ddc1e2285750f19814790f89712a995b6bef /src/output/formats.rs | |
parent | dda777e70121324c4855b94ee2b985f9eda7a251 (diff) | |
download | raidgrep-47348c960072d62031490e923d7fe5a9122ff1cc.tar.gz raidgrep-47348c960072d62031490e923d7fe5a9122ff1cc.tar.bz2 raidgrep-47348c960072d62031490e923d7fe5a9122ff1cc.zip |
include fight duration in output
Since we have this information now anyway, might as well include it.
We're using humantime here, as that produces the expected "xxm yys zzms"
output. The conversion shouldn't fail (the unwrap), as we should never
encounter negative fight durations.
Diffstat (limited to 'src/output/formats.rs')
-rw-r--r-- | src/output/formats.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/formats.rs b/src/output/formats.rs index 51de033..560963b 100644 --- a/src/output/formats.rs +++ b/src/output/formats.rs @@ -36,7 +36,7 @@ impl Format for HumanReadable { }; writeln!( result, - "{}: {} - {}: {}{} {}", + "{}: {} - {}: {}{} {} after {}", "Date".green(), item.time .with_timezone(&Local) @@ -47,6 +47,7 @@ impl Format for HumanReadable { .unwrap_or_else(|| "unknown".into()), if item.is_cm { " CM" } else { "" }, outcome, + humantime::Duration::from(item.duration.to_std().unwrap()), ) .unwrap(); for player in &item.players { |