mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use a more precise mechanism to measure elapsed times in operations.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -115,6 +115,12 @@ public partial class Dump
|
||||
bool _supportsPlextorD8;
|
||||
bool _useBufferedReads;
|
||||
static readonly TimeSpan _oneSecond = 1.Seconds();
|
||||
readonly Stopwatch _dumpStopwatch;
|
||||
readonly Stopwatch _sidecarStopwatch;
|
||||
readonly Stopwatch _speedStopwatch;
|
||||
readonly Stopwatch _trimStopwatch;
|
||||
readonly Stopwatch _writeStopwatch;
|
||||
readonly Stopwatch _imageCloseStopwatch;
|
||||
|
||||
/// <summary>Initializes dumpers</summary>
|
||||
/// <param name="doResume">Should resume?</param>
|
||||
@@ -207,6 +213,12 @@ public partial class Dump
|
||||
_ignoreCdrRunOuts = ignoreCdrRunOuts;
|
||||
_createGraph = createGraph;
|
||||
_dimensions = dimensions;
|
||||
_dumpStopwatch = new Stopwatch();
|
||||
_sidecarStopwatch = new Stopwatch();
|
||||
_speedStopwatch = new Stopwatch();
|
||||
_trimStopwatch = new Stopwatch();
|
||||
_writeStopwatch = new Stopwatch();
|
||||
_imageCloseStopwatch = new Stopwatch();
|
||||
}
|
||||
|
||||
/// <summary>Starts dumping with the established fields and autodetecting the device type</summary>
|
||||
|
||||
Reference in New Issue
Block a user