diff options
Diffstat (limited to 'MdePkg/Include/Library/UefiLib.h')
-rw-r--r-- | MdePkg/Include/Library/UefiLib.h | 41 |
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
|