[Logger] Add days count, if needed

This commit is contained in:
Matt Nadareski
2017-02-28 23:32:28 -08:00
parent d18f1b8595
commit 3349be25d1

View File

@@ -115,7 +115,18 @@ namespace SabreTools.Helper
}
TimeSpan span = DateTime.Now.Subtract(_start);
string total = span.ToString(@"hh\:mm\:ss");
// Special case for multi-day runs
string total = "";
if (span >= TimeSpan.FromDays(1))
{
total = span.ToString(@"d\:hh\:mm\:ss");
}
else
{
total = span.ToString(@"hh\:mm\:ss");
}
if (!_tofile)
{
Console.WriteLine("Total runtime: " + total);