summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorbxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-22 08:04:47 +0000
committerbxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-22 08:04:47 +0000
commitb3ccb7ef1242447cf491c813d43a0aecad8e938a (patch)
treef990d80535cb73adaec7337629186b593e296984 /MdePkg
parent267f7f10ec2fc883288f041600015ffdd2336dae (diff)
downloadedk2-b3ccb7ef1242447cf491c813d43a0aecad8e938a.zip
edk2-b3ccb7ef1242447cf491c813d43a0aecad8e938a.tar.gz
edk2-b3ccb7ef1242447cf491c813d43a0aecad8e938a.tar.bz2
Fixed tracker #52
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@228 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-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 6f78e4e..9c69cdf 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;
}
/**