Use Stopwatch.StartNew() in ImageAnimator (#53330)
authorJeff Handley <jeffhandley@users.noreply.github.com>
Thu, 27 May 2021 05:00:23 +0000 (22:00 -0700)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 05:00:23 +0000 (05:00 +0000)
src/libraries/System.Drawing.Common/src/System/Drawing/ImageAnimator.cs

index eb3fb8e..49ce7c0 100644 (file)
@@ -382,8 +382,8 @@ namespace System.Drawing
         private static void AnimateImages()
         {
             Debug.Assert(s_imageInfoList != null, "Null images list");
-            Stopwatch stopwatch = new Stopwatch();
-            stopwatch.Start();
+
+            Stopwatch stopwatch = Stopwatch.StartNew();
 
             while (true)
             {