From 9a9a330f99245e4c5f4938038828ae0f2766d5dd Mon Sep 17 00:00:00 2001 From: Michael Maxwell Date: Wed, 22 Sep 2021 15:14:30 -0400 Subject: [PATCH] Update MetricAPITest.cs --- test/OpenTelemetry.Tests/Metrics/MetricAPITest.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/OpenTelemetry.Tests/Metrics/MetricAPITest.cs b/test/OpenTelemetry.Tests/Metrics/MetricAPITest.cs index 668a6aa1328..f2e06df3a31 100644 --- a/test/OpenTelemetry.Tests/Metrics/MetricAPITest.cs +++ b/test/OpenTelemetry.Tests/Metrics/MetricAPITest.cs @@ -284,8 +284,7 @@ void ProcessExport(Batch batch) // Block until all threads started. mreToEnsureAllThreadsStarted.WaitOne(); - Stopwatch sw = new Stopwatch(); - sw.Start(); + Stopwatch sw = Stopwatch.StartNew(); // unblock all the threads. // (i.e let them start counter.Add) @@ -354,8 +353,7 @@ void ProcessExport(Batch batch) // Block until all threads started. mreToEnsureAllThreadsStarted.WaitOne(); - Stopwatch sw = new Stopwatch(); - sw.Start(); + Stopwatch sw = Stopwatch.StartNew(); // unblock all the threads. // (i.e let them start counter.Add)