summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-17 14:21:43 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-17 14:21:43 +0000
commit52ca0d9816a2bf1f9082693ca886b9d0bed95365 (patch)
tree0b1ec81018d2d2654ef345f0e127c15161a03476
parent8dd2a792d66d9f98d8b0a5dc57be42da087f3a1f (diff)
downloadedk2-platforms-52ca0d9816a2bf1f9082693ca886b9d0bed95365.tar.xz
Add 3 macros to manager Timer events.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6563 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/Library/UefiLib.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 9f888da68f..8c5b628aa9 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -29,6 +29,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/DriverDiagnostics.h>
#include <Protocol/DriverDiagnostics2.h>
+#include <Library/BaseLib.h>
+
///
/// Unicode String Table
///
@@ -57,6 +59,45 @@ typedef struct {
/**
+ Macro that returns the number of 100 ns units for a specified number of microseconds.
+ Useful for managing EFI timer events.
+
+ @param Microseconds Number of microseonds.
+
+ @return The number of 100 ns units equivalent to the number of microseconds specified
+ by Microseconds.
+
+**/
+#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)
+
+
+/**
+ Macro that returns the number of 100 ns units for a specified number of milliseoconds.
+ Useful for managing EFI timer events.
+
+ @param Milliseconds Number of milliseconds.
+
+ @return The number of 100 ns units equivalent to the number of milliseconds specified
+ by Milliseconds.
+
+**/
+#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)
+
+
+/**
+ Macro that returns the number of 100 ns units for a specified number of seoconds.
+ Useful for managing EFI timer events.
+
+ @param Seconds Number of seconds.
+
+ @return The number of 100 ns units equivalent to the number of seconds specified
+ by Seconds.
+
+**/
+#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)
+
+
+/**
This function searches the list of configuration tables stored in the EFI System
Table for a table with a GUID that matches TableGuid. If a match is found,
then a pointer to the configuration table is returned in Table, and EFI_SUCCESS