diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs b/src/libraries/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs index 452d59aadbc718..672e6af2f32acf 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs @@ -15,7 +15,15 @@ public static class StopwatchTests public static void GetTimestamp() { long ts1 = Stopwatch.GetTimestamp(); - Sleep(); + if (PlatformDetection.IsBrowser) + { + // workaround for issue: https://github.com/dotnet/runtime/issues/62021 + Sleep(5); + } + else + { + Sleep(); + } long ts2 = Stopwatch.GetTimestamp(); Assert.NotEqual(ts1, ts2); }