diff options
author | Elvin Li <elvin.li@intel.com> | 2013-10-29 06:47:47 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-29 06:47:47 +0000 |
commit | d1edec0a33dd6c10249c094c6ccb60c6c98d7b27 (patch) | |
tree | 498be4a22a5d7d0971e4bfed7128e30f435c2279 /MdeModulePkg/Core | |
parent | 017baa1cf380ce9fd00e39bc89e6067d8bf5112b (diff) | |
download | edk2-d1edec0a33dd6c10249c094c6ccb60c6c98d7b27.zip edk2-d1edec0a33dd6c10249c094c6ccb60c6c98d7b27.tar.gz edk2-d1edec0a33dd6c10249c094c6ccb60c6c98d7b27.tar.bz2 |
Fix the bug that SetTimer () cannot work when Type is TimerPeriodic and TriggerTime is 0.
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
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Event/Timer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/Event/Timer.c b/MdeModulePkg/Core/Dxe/Event/Timer.c index 3b17ae91..087e55e 100644 --- a/MdeModulePkg/Core/Dxe/Event/Timer.c +++ b/MdeModulePkg/Core/Dxe/Event/Timer.c @@ -1,7 +1,7 @@ /** @file
Core Timer Services
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -281,6 +281,9 @@ CoreSetTimer ( if (Type != TimerCancel) {
if (Type == TimerPeriodic) {
+ if (TriggerTime == 0) {
+ gTimer->GetTimerPeriod (gTimer, &TriggerTime);
+ }
Event->Timer.Period = TriggerTime;
}
|