diff --git a/Code/Media/AvProcess.cs b/Code/Media/AvProcess.cs index 5da2ba3..2069463 100644 --- a/Code/Media/AvProcess.cs +++ b/Code/Media/AvProcess.cs @@ -80,8 +80,8 @@ namespace Flowframes if (!show) { - ffmpeg.OutputDataReceived += (sender, outLine) => { AvOutputHandler.LogOutput(outLine.Data, ref processOutput, "ffmpeg", logMode, progressBar); timeSinceLastOutput.sw.Restart(); }; - ffmpeg.ErrorDataReceived += (sender, outLine) => { AvOutputHandler.LogOutput(outLine.Data, ref processOutput, "ffmpeg", logMode, progressBar); timeSinceLastOutput.sw.Restart(); }; + ffmpeg.OutputDataReceived += (sender, outLine) => { AvOutputHandler.LogOutput(outLine.Data, ref processOutput, "ffmpeg", logMode, progressBar); timeSinceLastOutput.Sw.Restart(); }; + ffmpeg.ErrorDataReceived += (sender, outLine) => { AvOutputHandler.LogOutput(outLine.Data, ref processOutput, "ffmpeg", logMode, progressBar); timeSinceLastOutput.Sw.Restart(); }; } ffmpeg.Start(); diff --git a/Code/MiscUtils/BackgroundTaskManager.cs b/Code/MiscUtils/BackgroundTaskManager.cs index d5573e8..5bd648c 100644 --- a/Code/MiscUtils/BackgroundTaskManager.cs +++ b/Code/MiscUtils/BackgroundTaskManager.cs @@ -37,7 +37,7 @@ namespace Flowframes.MiscUtils { foreach(RunningTask task in runningTasks) { - if(task.timer.sw.ElapsedMilliseconds > task.timeoutSeconds * 1000) + if(task.timer.Sw.ElapsedMilliseconds > task.timeoutSeconds * 1000) { Logger.Log($"[BgTaskMgr] Task with ID {task.id} timed out, has been running for {task.timer}!", true); runningTasks.Remove(task); diff --git a/Code/MiscUtils/NmkdStopwatch.cs b/Code/MiscUtils/NmkdStopwatch.cs index d643488..b96f0c7 100644 --- a/Code/MiscUtils/NmkdStopwatch.cs +++ b/Code/MiscUtils/NmkdStopwatch.cs @@ -1,23 +1,23 @@ using System; using System.Diagnostics; -using System.Linq; namespace Flowframes.MiscUtils { class NmkdStopwatch { - public Stopwatch sw = new Stopwatch(); - public long ElapsedMs { get { return sw.ElapsedMilliseconds; } } + public Stopwatch Sw = new Stopwatch(); + public TimeSpan Elapsed { get { return Sw.Elapsed; } } + public long ElapsedMs { get { return Sw.ElapsedMilliseconds; } } public NmkdStopwatch(bool startOnCreation = true) { if (startOnCreation) - sw.Restart(); + Sw.Restart(); } public override string ToString() { - return FormatUtils.TimeSw(sw); + return FormatUtils.TimeSw(Sw); } } }