Skip to content

Commit 68a84e9

Browse files
Update Benchmarker in order to properly reset stopwatch
1 parent f148e54 commit 68a84e9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Benchmarker.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ public void Dispose()
2626

2727
Console.WriteLine($"{_input} took {_stopwatch.Elapsed} [{_stopwatch.ElapsedTicks} ticks]");
2828

29+
_stopwatch.Reset();
30+
_input = null;
31+
2932
PoolFactory<Stopwatch>.Shared.Return(_stopwatch);
30-
PoolFactory<Benchmarker>.Shared.Return(this);
3133

32-
_input = null;
3334
_stopwatch = null;
35+
PoolFactory<Benchmarker>.Shared.Return(this);
3436
}
3537
}

0 commit comments

Comments
 (0)