Add time elapsed to debug output

This commit is contained in:
Matt Nadareski
2021-08-25 20:25:45 -07:00
parent 3ab0bcc0ae
commit d26a89b8ab

View File

@@ -71,6 +71,9 @@ namespace BurnOutSharp
if (paths == null || !paths.Any())
return null;
// Set a starting starting time for debug output
DateTime startTime = DateTime.UtcNow;
// Checkpoint
FileProgress?.Report(new ProtectionProgress(null, 0, null));
@@ -175,6 +178,10 @@ namespace BurnOutSharp
// Clear out any empty keys
Utilities.ClearEmptyKeys(protections);
// If we're in debug, output the elasped time to console
if (IncludeDebug)
Console.WriteLine($"Time elapsed: {DateTime.UtcNow.Subtract(startTime)}");
return protections;
}