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 3b17ae9..087e55e 100644 (file)
@@ -1,7 +1,7 @@
 /** @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
@@ -281,6 +281,9 @@ CoreSetTimer (
   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