From b3ccb7ef1242447cf491c813d43a0aecad8e938a Mon Sep 17 00:00:00 2001 From: bxing Date: Mon, 22 May 2006 08:04:47 +0000 Subject: Fixed tracker #52 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@228 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseTimerLibLocalApic/x86TimerLib.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'MdePkg/Library/BaseTimerLibLocalApic') 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; } /** -- cgit v1.2.3