Use humanizer to show seconds.

This commit is contained in:
2023-09-26 03:39:10 +01:00
parent d44b32af98
commit 25c5cbaae5
22 changed files with 8793 additions and 5738 deletions

View File

@@ -41,6 +41,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Humanizer;
using Humanizer.Bytes;
using Humanizer.Localisation;
namespace Aaru.Core.Devices.Dumping;
@@ -98,7 +99,7 @@ partial class Dump
return;
totalChkDuration = (end - chkStart).TotalMilliseconds;
_dumpLog.WriteLine(Localization.Core.Sidecar_created_in_0_seconds, (end - chkStart).TotalSeconds);
_dumpLog.WriteLine(Localization.Core.Sidecar_created_in_0, (end - chkStart).Humanize(minUnit: TimeUnit.Second));
_dumpLog.WriteLine(Localization.Core.Average_checksum_speed_0,
ByteSize.FromBytes(blockSize * (blocks + 1)).Per(totalChkDuration.Milliseconds()));