From 449f6ee83339d135480738e079b20eabff0a9baf Mon Sep 17 00:00:00 2001 From: lukeIam <2lukeiam@gmail.com> Date: Sat, 31 Mar 2018 18:24:20 +0200 Subject: [PATCH] Fix: CBenchmark.Begin() with CBenchmark.End() throws an exception --- VocaluxeLib/Log/CBenchmark.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VocaluxeLib/Log/CBenchmark.cs b/VocaluxeLib/Log/CBenchmark.cs index 19ddf6c9..89482654 100644 --- a/VocaluxeLib/Log/CBenchmark.cs +++ b/VocaluxeLib/Log/CBenchmark.cs @@ -61,10 +61,10 @@ namespace VocaluxeLib.Log /// Stops this benchmark. /// /// If true a success message will be added to the log otherwise a message for failure. - public void Stop(bool success = true) + public void Stop(bool success = true) { if (_Watch == null) - throw new InvalidOperationException("Timer is not running."); + return; _Watch.Stop(); double duration = _GetElapsedTime(_Watch);