Fixed tracker #52
authorbxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 May 2006 08:04:47 +0000 (08:04 +0000)
committerbxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 22 May 2006 08:04:47 +0000 (08:04 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@228 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c

index 6f78e4e..9c69cdf 100644 (file)
@@ -25,18 +25,18 @@ DelayWorker (
   IN      UINT64                    NDelay\r
   )\r
 {\r
-  UINT                            Ticks;\r
-\r
-  Ticks = (UINTN)GetPerformanceCounter ();\r
-  Ticks -= (UINTN)DivU64x32 (\r
-                    MultU64x64 (\r
-                      GetPerformanceCounterProperties (NULL, NULL),\r
-                      NDelay\r
-                      ),\r
-                    1000000000u\r
-                    );\r
-  while (Ticks >= GetPerformanceCounter ());\r
-  return Ticks;\r
+  UINT64                            Ticks;\r
+\r
+  Ticks = GetPerformanceCounter ();\r
+  Ticks -= DivU64x32 (\r
+             MultU64x64 (\r
+               GetPerformanceCounterProperties (NULL, NULL),\r
+               NDelay\r
+               ),\r
+             1000000000u\r
+             );\r
+  while (Ticks <= GetPerformanceCounter ());\r
+  return (UINTN)Ticks;\r
 }\r
 \r
 /**\r