]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug that SetTimer () cannot work when Type is TimerPeriodic and TriggerTime...
authorElvin Li <elvin.li@intel.com>
Tue, 29 Oct 2013 06:47:47 +0000 (06:47 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 Oct 2013 06:47:47 +0000 (06:47 +0000)
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14811 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Event/Timer.c

index 3b17ae917cef7d1a50d6a260b2b83a20c2fca7de..087e55e649521e51b8bae45cd39e6fed475f145c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Core Timer Services\r
 \r
 /** @file\r
   Core Timer Services\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -281,6 +281,9 @@ CoreSetTimer (
   if (Type != TimerCancel) {\r
 \r
     if (Type == TimerPeriodic) {\r
   if (Type != TimerCancel) {\r
 \r
     if (Type == TimerPeriodic) {\r
+      if (TriggerTime == 0) {\r
+        gTimer->GetTimerPeriod (gTimer, &TriggerTime);\r
+      }\r
       Event->Timer.Period = TriggerTime;\r
     }\r
 \r
       Event->Timer.Period = TriggerTime;\r
     }\r
 \r