Fix: CBenchmark.Begin() with CBenchmark.End() throws an exception
This commit is contained in:
1 parent
8d54dd869f
commit
449f6ee833
1 file changed
+2
-2
@@ -61,10 +61,10 @@ namespace VocaluxeLib.Log
|
|||||||
/// Stops this benchmark.
|
/// Stops this benchmark.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="success">If true a success message will be added to the log otherwise a message for failure.</param>
|
/// <param name="success">If true a success message will be added to the log otherwise a message for failure.</param>
|
||||||
public void Stop(bool success = true)
|
public void Stop(bool success = true)
|
||||||
{
|
{
|
||||||
if (_Watch == null)
|
if (_Watch == null)
|
||||||
throw new InvalidOperationException("Timer is not running.");
|
return;
|
||||||
_Watch.Stop();
|
_Watch.Stop();
|
||||||
double duration = _GetElapsedTime(_Watch);
|
double duration = _GetElapsedTime(_Watch);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user