From: bxing Date: Mon, 22 May 2006 08:04:47 +0000 (+0000) Subject: Fixed tracker #52 X-Git-Tag: edk2-stable201903~25458 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=b3ccb7ef1242447cf491c813d43a0aecad8e938a;ds=sidebyside Fixed tracker #52 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@228 6f19259b-4bc3-4df7-8a09-765794883524 --- 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; } /**