summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c b/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c
index 6f78e4e4fd..9c69cdfb92 100644
--- a/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c
+++ b/MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c
@@ -25,18 +25,18 @@ DelayWorker (
IN UINT64 NDelay
)
{
- UINTN Ticks;
-
- Ticks = (UINTN)GetPerformanceCounter ();
- Ticks -= (UINTN)DivU64x32 (
- MultU64x64 (
- GetPerformanceCounterProperties (NULL, NULL),
- NDelay
- ),
- 1000000000u
- );
- while (Ticks >= GetPerformanceCounter ());
- return Ticks;
+ UINT64 Ticks;
+
+ Ticks = GetPerformanceCounter ();
+ Ticks -= DivU64x32 (
+ MultU64x64 (
+ GetPerformanceCounterProperties (NULL, NULL),
+ NDelay
+ ),
+ 1000000000u
+ );
+ while (Ticks <= GetPerformanceCounter ());
+ return (UINTN)Ticks;
}
/**